Skip to contentSkip to conversation

mfd: max14577: max14577_{suspend,resume}() should depend on CONFIG_PM_SLEEP

PATCH Applied Geert Uytterhoeven 3 participants 7 messages Jan 26, 2014 – Feb 3, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mfd: max14577: max14577_{suspend,resume}() should depend on CONFIG_PM_SLEEP

If CONFIG_PM_SLEEP=n:

drivers/mfd/max14577.c:177: warning: ‘max14577_suspend’ defined but not used drivers/mfd/max14577.c:200: warning: ‘max14577_resume’ defined but not used

---
 drivers/mfd/max14577.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/mfd/max14577.c +2 -0
index ac514fb2b877..71aa14a6bfbb 100644
@@ -173,6 +173,7 @@ static const struct i2c_device_id max14577_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, max14577_i2c_id);
 
+#ifdef CONFIG_PM_SLEEP
 static int max14577_suspend(struct device *dev)
 {
 	struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
@@ -208,6 +209,7 @@ static int max14577_resume(struct device *dev)
 
 	return 0;
 }
+#endif /* CONFIG_PM_SLEEP */
 
 static struct of_device_id max14577_dt_match[] = {
 	{ .compatible = "maxim,max14577", },
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 2/2 mfd: sec-core: sec_pmic_{suspend,resume}() should depend on CONFIG_PM_SLEEP

If CONFIG_PM_SLEEP=n:

drivers/mfd/sec-core.c:349: warning: ‘sec_pmic_suspend’ defined but not used drivers/mfd/sec-core.c:371: warning: ‘sec_pmic_resume’ defined but not used

---
 drivers/mfd/sec-core.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/mfd/sec-core.c +2 -0
index e4671088f075..dbc39e676cbd 100644
@@ -345,6 +345,7 @@ static int sec_pmic_remove(struct i2c_client *i2c)
 	return 0;
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int sec_pmic_suspend(struct device *dev)
 {
 	struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
@@ -379,6 +380,7 @@ static int sec_pmic_resume(struct device *dev)
 
 	return 0;
 }
+#endif /* CONFIG_PM_SLEEP */
 
 static SIMPLE_DEV_PM_OPS(sec_pmic_pm_ops, sec_pmic_suspend, sec_pmic_resume);
 
Signature · 1 line
1.7.9.5
Applied
#2 lore raw

Re: [PATCH 2/2] mfd: sec-core: sec_pmic_{suspend,resume}() should depend on CONFIG_PM_SLEEP

Quoted 9 lines

If CONFIG_PM_SLEEP=n:

drivers/mfd/sec-core.c:349: warning: ‘sec_pmic_suspend’ defined but not used drivers/mfd/sec-core.c:371: warning: ‘sec_pmic_resume’ defined but not used

---
 drivers/mfd/sec-core.c |    2 ++
 1 file changed, 2 insertions(+)

Applied to my -fixes branch.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#3 lore raw
In reply to Geert Uytterhoeven
Quoted 23 lines · Geert Uytterhoeven

If CONFIG_PM_SLEEP=n:

drivers/mfd/max14577.c:177: warning: ‘max14577_suspend’ defined but not used drivers/mfd/max14577.c:200: warning: ‘max14577_resume’ defined but not used

---
 drivers/mfd/max14577.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/mfd/max14577.c +1 -0
index ac514fb2b877..71aa14a6bfbb 100644
@@ -173,6 +173,7 @@ static const struct i2c_device_id max14577_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, max14577_i2c_id);
 
+#ifdef CONFIG_PM_SLEEP
 static int max14577_suspend(struct device *dev)
 {
 	struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);

drivers/mfd/max14577.c static int max14577_resume(struct device *dev) · line 215

Quoted 7 lines
drivers/mfd/max14577.c +1 -0
@@ -208,6 +209,7 @@ static int max14577_resume(struct device *dev)
 
 	return 0;
 }
+#endif /* CONFIG_PM_SLEEP */
 
 static struct of_device_id max14577_dt_match[] = {
 	{ .compatible = "maxim,max14577", },

Same here:
http://thread.gmane.org/gmane.linux.kernel/1615513/focus=1615563
although I don't mind if your patch comes in :).

Best regards,
Krzysztof

#4 lore raw
Quoted 29 lines · Krzysztof Kozlowski
Quoted 28 lines · Geert Uytterhoeven

If CONFIG_PM_SLEEP=n:

drivers/mfd/max14577.c:177: warning: ‘max14577_suspend’ defined but not used drivers/mfd/max14577.c:200: warning: ‘max14577_resume’ defined but not used

---
 drivers/mfd/max14577.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/mfd/max14577.c +2 -0
index ac514fb2b877..71aa14a6bfbb 100644
@@ -173,6 +173,7 @@ static const struct i2c_device_id max14577_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, max14577_i2c_id);
 
+#ifdef CONFIG_PM_SLEEP
 static int max14577_suspend(struct device *dev)
 {
      struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
@@ -208,6 +209,7 @@ static int max14577_resume(struct device *dev)
 
      return 0;
 }
+#endif /* CONFIG_PM_SLEEP */
 
Quoted 6 lines

drivers/mfd/max14577.c static int max14577_resume(struct device *dev) · line 215

Quoted 2 lines
drivers/mfd/max14577.c +0 -0
 static struct of_device_id max14577_dt_match[] = {
      { .compatible = "maxim,max14577", },

Same here:
http://thread.gmane.org/gmane.linux.kernel/1615513/focus=1615563
although I don't mind if your patch comes in :).

Sorry, missed those.
It's a pity these known fixes don't go in together with the code that introduces them...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#5 lore raw
Quoted 35 lines
Quoted 28 lines
Quoted 28 lines

If CONFIG_PM_SLEEP=n:

drivers/mfd/max14577.c:177: warning: ‘max14577_suspend’ defined but not used drivers/mfd/max14577.c:200: warning: ‘max14577_resume’ defined but not used

---
 drivers/mfd/max14577.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/mfd/max14577.c +2 -0
index ac514fb2b877..71aa14a6bfbb 100644
@@ -173,6 +173,7 @@ static const struct i2c_device_id max14577_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, max14577_i2c_id);
 
+#ifdef CONFIG_PM_SLEEP
 static int max14577_suspend(struct device *dev)
 {
      struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
@@ -208,6 +209,7 @@ static int max14577_resume(struct device *dev)
 
      return 0;
 }
+#endif /* CONFIG_PM_SLEEP */
 
Quoted 6 lines

drivers/mfd/max14577.c static int max14577_resume(struct device *dev) · line 215

Quoted 2 lines
drivers/mfd/max14577.c +0 -0
 static struct of_device_id max14577_dt_match[] = {
      { .compatible = "maxim,max14577", },

Same here:
http://thread.gmane.org/gmane.linux.kernel/1615513/focus=1615563
although I don't mind if your patch comes in :).

Quoted 3 lines

Sorry, missed those.
It's a pity these known fixes don't go in together with the code that introduces them...

Great idea. Can I borrow your time machine? ;)

Or, we can use the -rcs, as this is what they were designed for.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Applied
#6 lore raw
In reply to Geert Uytterhoeven
Quoted 9 lines

If CONFIG_PM_SLEEP=n:

drivers/mfd/max14577.c:177: warning: ‘max14577_suspend’ defined but not used drivers/mfd/max14577.c:200: warning: ‘max14577_resume’ defined but not used

---
 drivers/mfd/max14577.c |    2 ++
 1 file changed, 2 insertions(+)

Applied to my -fixes branch.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog