linux/drivers/video/backlight
Nathan Chancellor d3cc7cd7bc backlight: aw99706: Fix unused function warnings from suspend/resume ops
When building for a platform without CONFIG_PM_SLEEP, such as s390,
there are two unused function warnings:

  drivers/video/backlight/aw99706.c:436:12: error: 'aw99706_resume' defined but not used [-Werror=unused-function]
    436 | static int aw99706_resume(struct device *dev)
        |            ^~~~~~~~~~~~~~
  drivers/video/backlight/aw99706.c:429:12: error: 'aw99706_suspend' defined but not used [-Werror=unused-function]
    429 | static int aw99706_suspend(struct device *dev)
        |            ^~~~~~~~~~~~~~~

SET_SYSTEM_SLEEP_PM_OPS, used within SIMPLE_DEV_PM_OPS, expands to
nothing when CONFIG_PM_SLEEP is not set, so these functions are
completely unused in this configuration.

SIMPLE_DEV_PM_OPS is deprecated in favor of DEFINE_SIMPLE_DEV_PM_OPS,
which avoids this issue by using pm_sleep_ptr to make these callbacks
NULL when CONFIG_PM_SLEEP is unset while making the callback functions
always appear used to the compiler regardless of configuration. Switch
to DEFINE_SIMPLE_DEV_PM_OPS for aw99706_pm_ops to clear up the warning.

Additionally, wrap the pointer to aw99706_pm_ops in pm_ptr() in
aw99706_i2c_driver to ensure that the structure is completely eliminated
in configurations without CONFIG_PM.

Fixes: 88a8e9b49ee8 ("backlight: aw99706: Add support for Awinic AW99706 backlight")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20251120-backlight-aw99706-fix-unused-pm-functions-v1-1-8b9c17c4e783@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2025-11-27 08:34:21 +00:00
..
88pm860x_bl.c backlight: 88pm860x_bl: Do not include <linux/fb.h> 2025-02-11 10:20:18 +00:00
Kconfig backlight: aw99706: Add support for Awinic AW99706 backlight 2025-11-25 12:54:14 +00:00
Makefile backlight: aw99706: Add support for Awinic AW99706 backlight 2025-11-25 12:54:14 +00:00
aat2870_bl.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
adp5520_bl.c backlight: adp5520_bl: Do not include <linux/fb.h> 2025-02-11 10:20:18 +00:00
adp8860_bl.c backlight: adp8860_bl: Do not include <linux/fb.h> 2025-02-11 10:20:18 +00:00
adp8870_bl.c backlight: adp8870_bl: Do not include <linux/fb.h> 2025-02-11 10:20:18 +00:00
ams369fg06.c backlight: ams369fb06: Use backlight power constants 2024-07-04 16:45:25 +01:00
apple_bl.c
apple_dwi_bl.c backlight: apple_dwi_bl: Include <linux/mod_devicetable.h> 2025-09-16 17:05:19 +01:00
arcxcnn_bl.c backlight: Switch i2c drivers back to use .probe() 2023-05-25 12:25:26 +01:00
as3711_bl.c backlight: as3711_bl: Include <linux/of.h> 2025-09-16 17:05:19 +01:00
aw99706.c backlight: aw99706: Fix unused function warnings from suspend/resume ops 2025-11-27 08:34:21 +00:00
backlight.c backlight: Include <linux/of.h> 2025-09-16 17:05:19 +01:00
bd6107.c backlight: bd6107_bl: Do not include <linux/fb.h> 2025-02-11 10:20:18 +00:00
corgi_lcd.c backlight: lcd: Remove struct fb_videomode from set_mode callback 2024-09-30 16:49:42 +01:00
da903x_bl.c backlight: da903x_bl: Do not include <linux/fb.h> 2025-02-11 10:20:18 +00:00
da9052_bl.c backlight: da9052_bl: Include <linux/mod_devicetable.h> 2025-09-16 17:05:19 +01:00
ep93xx_bl.c backlight: ep93xx_bl: Do not include <linux/fb.h> 2025-02-11 10:20:18 +00:00
gpio_backlight.c backlight: gpio-backlight: Use backlight power constants 2024-07-04 16:45:25 +01:00
hp680_bl.c backlight: hp680_bl: Do not include <linux/fb.h> 2025-02-11 10:20:18 +00:00
hx8357.c backlight: hx8357: Use lcd power constants 2024-09-30 16:49:41 +01:00
ili922x.c backlight: ili922x: Use lcd power constants 2024-09-30 16:49:41 +01:00
ili9320.c backlight: ili9320: Use lcd power constants 2024-09-30 16:49:41 +01:00
ili9320.h
ipaq_micro_bl.c backlight: ipaq-micro-backlight: Use backlight power constants 2024-07-04 16:45:25 +01:00
jornada720_bl.c backlight: jornada720: Include <linux/io.h> 2025-09-16 17:05:19 +01:00
jornada720_lcd.c backlight: jornada720_lcd: Use lcd power constants 2024-09-30 16:49:41 +01:00
kb3886_bl.c backlight: kb3886-bl: Use backlight power constants 2024-07-04 16:45:25 +01:00
ktd253-backlight.c backlight: ktd253-backlight: Use backlight power constants 2024-07-04 16:45:25 +01:00
ktd2801-backlight.c backlight: ktd2801: Include <linux/mod_devicetable.h> 2025-09-16 17:05:19 +01:00
ktz8866.c backlight: ktz8866: Fix module autoloading 2024-10-02 13:46:34 +01:00
l4f00242t03.c backlight: l4f00242t03: Use lcd power constants 2024-09-30 16:49:41 +01:00
lcd.c backlight: lcd: Replace fb events with a dedicated function call 2025-04-10 10:39:10 +01:00
led_bl.c backlight: led-bl: Add devlink to supplier LEDs 2025-11-25 12:54:10 +00:00
lm3509_bl.c backlight: lm3509_bl: Fix early returns in for_each_child_of_node() 2024-06-26 16:49:59 +01:00
lm3533_bl.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
lm3630a_bl.c backlight: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-06-20 18:36:25 +01:00
lm3639_bl.c backlight: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-06-20 18:36:25 +01:00
lms283gf05.c backlight: lms283gf05: Use lcd power constants 2024-09-30 16:49:41 +01:00
lms501kf03.c backlight: lms501kf03: Use lcd power constants 2024-09-30 16:49:42 +01:00
locomolcd.c backlight: locomolcd: Do not include <linux/fb.h> 2025-02-11 10:20:18 +00:00
lp855x_bl.c video: backlight: lp855x_bl: Set correct EPROM start for LP8556 2025-09-16 16:50:50 +01:00
lp8788_bl.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ltv350qv.c backlight: ltv350qv: Use lcd power constants 2024-09-30 16:49:42 +01:00
ltv350qv.h
lv5207lp.c backlight: lv5207lp: Do not include <linux/fb.h> 2025-02-11 10:20:18 +00:00
max8925_bl.c backlight: max8925_bl: Do not include <linux/fb.h> 2025-02-11 10:20:18 +00:00
mp3309c.c backlight: mp3309c: Initialize backlight properties without memset 2025-09-02 11:36:59 +01:00
mt6370-backlight.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
omap1_bl.c backlight: Remove fb_blank from struct backlight_properties 2024-03-28 10:16:26 +00:00
otm3225a.c backlight: otm3225a: Use lcd power constants 2024-09-30 16:49:42 +01:00
pandora_bl.c backlight: pandora-backlight: Use backlight power constants 2024-07-04 16:45:25 +01:00
platform_lcd.c backlight: lcd: Replace check_fb with controls_device 2024-09-30 16:49:42 +01:00
pwm_bl.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
qcom-wled.c backlight: pm8941: Add NULL check in wled_configure() 2025-04-15 18:27:38 +01:00
rave-sp-backlight.c backlight: rave-sp: Include <linux/of.h> and <linux/mod_devicetable.h> 2025-09-16 17:05:19 +01:00
rt4831-backlight.c backlight: rt4831: Include <linux/mod_devicetable.h> 2025-09-16 17:05:19 +01:00
sky81452-backlight.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
tdo24m.c backlight: lcd: Remove struct fb_videomode from set_mode callback 2024-09-30 16:49:42 +01:00
tps65217_bl.c backlight: tps65217_bl: Do not include <linux/fb.h> 2025-02-11 10:20:18 +00:00
vgg2432a4.c backlight: vgg2432a4: Do not include <linux/fb.h> 2025-02-11 10:20:18 +00:00
wm831x_bl.c backlight: wm831x_bl: Do not include <linux/fb.h> 2025-02-11 10:20:18 +00:00