Skip to content

Commit

Permalink
media: staging/intel-ipu3: mark PM function as __maybe_unused
Browse files Browse the repository at this point in the history
BugLink: https://bugs.launchpad.net/bugs/1837517

[ Upstream commit 948dff7 ]

The imgu_rpm_dummy_cb() looks like an API misuse that is explained
in the comment above it. Aside from that, it also causes a warning
when power management support is disabled:

drivers/staging/media/ipu3/ipu3.c:794:12: error: 'imgu_rpm_dummy_cb' defined but not used [-Werror=unused-function]

The warning is at least easy to fix by marking the function as
__maybe_unused.

Fixes: 7fc7af6 ("media: staging/intel-ipu3: Add imgu top level pci device driver")

Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Khalid Elmously <[email protected]>
Signed-off-by: Stefan Bader <[email protected]>
  • Loading branch information
arndb authored and smb49 committed Aug 13, 2019
1 parent 1e017f6 commit fea719d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/media/ipu3/ipu3.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ static int __maybe_unused imgu_resume(struct device *dev)
* PCI rpm framework checks the existence of driver rpm callbacks.
* Place a dummy callback here to avoid rpm going into error state.
*/
static int imgu_rpm_dummy_cb(struct device *dev)
static __maybe_unused int imgu_rpm_dummy_cb(struct device *dev)
{
return 0;
}
Expand Down

0 comments on commit fea719d

Please sign in to comment.