Skip to content

Commit 408a759

Browse files
RishiGupta12thierryreding
authored andcommitted
pwm: pca9685: Replace CONFIG_PM with __maybe_unused
The __maybe_unused attribute is preferred over CONFIG_PM to prevent potential build time issues. This commit replaces CONFIG_PM with this attribute. Signed-off-by: Rishi Gupta <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 2d0c08f commit 408a759

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/pwm/pwm-pca9685.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,8 +508,7 @@ static int pca9685_pwm_remove(struct i2c_client *client)
508508
return 0;
509509
}
510510

511-
#ifdef CONFIG_PM
512-
static int pca9685_pwm_runtime_suspend(struct device *dev)
511+
static int __maybe_unused pca9685_pwm_runtime_suspend(struct device *dev)
513512
{
514513
struct i2c_client *client = to_i2c_client(dev);
515514
struct pca9685 *pca = i2c_get_clientdata(client);
@@ -518,15 +517,14 @@ static int pca9685_pwm_runtime_suspend(struct device *dev)
518517
return 0;
519518
}
520519

521-
static int pca9685_pwm_runtime_resume(struct device *dev)
520+
static int __maybe_unused pca9685_pwm_runtime_resume(struct device *dev)
522521
{
523522
struct i2c_client *client = to_i2c_client(dev);
524523
struct pca9685 *pca = i2c_get_clientdata(client);
525524

526525
pca9685_set_sleep_mode(pca, false);
527526
return 0;
528527
}
529-
#endif
530528

531529
static const struct i2c_device_id pca9685_id[] = {
532530
{ "pca9685", 0 },

0 commit comments

Comments
 (0)