Skip to contentSkip to conversation

usb: musb: am35x: use SIMPLE_DEV_PM_OPS

PATCH Superseded Daniel Mack 3 participants 11 messages Sep 22, 2013 – Oct 2, 2013

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 usb: musb: am35x: use SIMPLE_DEV_PM_OPS

This makes am35x_pm_ops const.

Also, checkpatch.pl complains about the use of DEV_PM_OPS:

ERROR: Macros with complex values should be enclosed in parenthesis

---
 drivers/usb/musb/am35x.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/usb/musb/am35x.c +2 -5
index 5c310c6..df32a29 100644
@@ -616,12 +616,9 @@ static int am35x_resume(struct device *dev)
 	return 0;
 }
 
-static struct dev_pm_ops am35x_pm_ops = {
-	.suspend	= am35x_suspend,
-	.resume		= am35x_resume,
-};
+static SIMPLE_DEV_PM_OPS(am35x_pm_ops, am35x_suspend, am35x_resume);
 
-#define DEV_PM_OPS	&am35x_pm_ops
+#define DEV_PM_OPS	(&am35x_pm_ops)
 #else
 #define DEV_PM_OPS	NULL
 #endif
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 2/4 usb: musb: blackfin: use SIMPLE_DEV_PM_OPS

This makes bfin_pm_ops const.

Also, checkpatch.pl complains about the use of DEV_PM_OPS:

ERROR: Macros with complex values should be enclosed in parenthesis

---
 drivers/usb/musb/blackfin.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/usb/musb/blackfin.c +2 -5
index 72e2056..7db75c9 100644
@@ -562,12 +562,9 @@ static int bfin_resume(struct device *dev)
 	return 0;
 }
 
-static struct dev_pm_ops bfin_pm_ops = {
-	.suspend	= bfin_suspend,
-	.resume		= bfin_resume,
-};
+static SIMPLE_DEV_PM_OPS(bfin_pm_ops, bfin_suspend, bfin_resume);
 
-#define DEV_PM_OPS	&bfin_pm_ops
+#define DEV_PM_OPS	(&bfin_pm_ops)
 #else
 #define DEV_PM_OPS	NULL
 #endif
Signature · 1 line
1.8.3.1
#2 lore raw

PATCH 3/4 usb: musb: omap2430: use SIMPLE_DEV_PM_OPS

In reply to Daniel Mack

This makes omap2430_pm_ops const.

---
 drivers/usb/musb/omap2430.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/usb/musb/omap2430.c +3 -4
index 59d2245..ef53737 100644
@@ -660,10 +660,9 @@ static int omap2430_runtime_resume(struct device *dev)
 	return 0;
 }
 
-static struct dev_pm_ops omap2430_pm_ops = {
-	.runtime_suspend = omap2430_runtime_suspend,
-	.runtime_resume = omap2430_runtime_resume,
-};
+static SIMPLE_DEV_PM_OPS(omap2430_pm_ops,
+			 omap2430_runtime_suspend,
+			 omap2430_runtime_resume);
 
 #define DEV_PM_OPS	(&omap2430_pm_ops)
 #else
Signature · 1 line
1.8.3.1
#3 lore raw

PATCH 4/4 usb: musb: ux500: use SIMPLE_DEV_PM_OPS

In reply to Daniel Mack

Just a cosmetic change to bring this file in line with other musb platform drivers.

---
 drivers/usb/musb/ux500.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/usb/musb/ux500.c +1 -4
index 59256b1..819b884 100644
@@ -377,10 +377,7 @@ static int ux500_resume(struct device *dev)
 	return 0;
 }
 
-static const struct dev_pm_ops ux500_pm_ops = {
-	.suspend	= ux500_suspend,
-	.resume		= ux500_resume,
-};
+static SIMPLE_DEV_PM_OPS(ux500_pm_ops, ux500_suspend, ux500_resume);
 
 #define DEV_PM_OPS	(&ux500_pm_ops)
 #else
Signature · 1 line
1.8.3.1
#4 lore raw
In reply to Daniel Mack

Hi,

Quoted 16 lines · Daniel Mack

This makes am35x_pm_ops const.

Also, checkpatch.pl complains about the use of DEV_PM_OPS:

ERROR: Macros with complex values should be enclosed in parenthesis

---
 drivers/usb/musb/am35x.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/usb/musb/am35x.c +0 -0
index 5c310c6..df32a29 100644

drivers/usb/musb/am35x.c static int am35x_resume(struct device *dev) · line 619

Quoted 8 lines
drivers/usb/musb/am35x.c +1 -4
@@ -616,12 +616,9 @@ static int am35x_resume(struct device *dev)
 	return 0;
 }
 
-static struct dev_pm_ops am35x_pm_ops = {
-	.suspend	= am35x_suspend,
-	.resume		= am35x_resume,
-};
+static SIMPLE_DEV_PM_OPS(am35x_pm_ops, am35x_suspend, am35x_resume);

you could as well remove the DEV_PM_OPS trickery. Ditto for all other patches

Signature · 1 line
balbi
#5 lore raw
Quoted 10 lines · Felipe Balbi

drivers/usb/musb/am35x.c static int am35x_resume(struct device *dev) · line 619

Quoted 5 lines · Daniel Mack
drivers/usb/musb/am35x.c +1 -4
-static struct dev_pm_ops am35x_pm_ops = {
-	.suspend	= am35x_suspend,
-	.resume		= am35x_resume,
-};
+static SIMPLE_DEV_PM_OPS(am35x_pm_ops, am35x_suspend, am35x_resume);

you could as well remove the DEV_PM_OPS trickery. Ditto for all other patches

Yes, I noticed that too. That's why I sent out a v2 of the series :)

Thanks,
Daniel

#6 lore raw
Quoted 12 lines · Daniel Mack
Quoted 10 lines · Felipe Balbi

drivers/usb/musb/am35x.c static int am35x_resume(struct device *dev) · line 619

Quoted 5 lines · Daniel Mack
drivers/usb/musb/am35x.c +1 -4
-static struct dev_pm_ops am35x_pm_ops = {
-	.suspend	= am35x_suspend,
-	.resume		= am35x_resume,
-};
+static SIMPLE_DEV_PM_OPS(am35x_pm_ops, am35x_suspend, am35x_resume);

you could as well remove the DEV_PM_OPS trickery. Ditto for all other patches

Quoted 1 line

Yes, I noticed that too. That's why I sent out a v2 of the series :)

Awesome :-) Thanks dude

Signature · 1 line
balbi
#7 lore raw
Quoted 13 lines · Felipe Balbi
Quoted 12 lines · Daniel Mack
Quoted 10 lines · Felipe Balbi

drivers/usb/musb/am35x.c static int am35x_resume(struct device *dev) · line 619

Quoted 5 lines · Daniel Mack
drivers/usb/musb/am35x.c +1 -4
-static struct dev_pm_ops am35x_pm_ops = {
-	.suspend	= am35x_suspend,
-	.resume		= am35x_resume,
-};
+static SIMPLE_DEV_PM_OPS(am35x_pm_ops, am35x_suspend, am35x_resume);

you could as well remove the DEV_PM_OPS trickery. Ditto for all other patches

Quoted 3 lines
Quoted 1 line

Yes, I noticed that too. That's why I sent out a v2 of the series :)

Awesome :-) Thanks dude

So are you happy with this v2?
It's just a cosmetic cleanup after all ...

Thanks,
Daniel

#8 lore raw

Hi,

Quoted 14 lines · Daniel Mack
Quoted 13 lines · Felipe Balbi
Quoted 12 lines · Daniel Mack
Quoted 10 lines · Felipe Balbi

drivers/usb/musb/am35x.c static int am35x_resume(struct device *dev) · line 619

Quoted 5 lines · Daniel Mack
drivers/usb/musb/am35x.c +1 -4
-static struct dev_pm_ops am35x_pm_ops = {
-	.suspend	= am35x_suspend,
-	.resume		= am35x_resume,
-};
+static SIMPLE_DEV_PM_OPS(am35x_pm_ops, am35x_suspend, am35x_resume);

you could as well remove the DEV_PM_OPS trickery. Ditto for all other patches

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Yes, I noticed that too. That's why I sent out a v2 of the series :)

Awesome :-) Thanks dude

So are you happy with this v2?
It's just a cosmetic cleanup after all ...

I can't see v2 anywhere... The only version I have is the one with DEV_PM_OPS still in it.

Signature · 1 line
balbi
#9 lore raw
Quoted 17 lines · Felipe Balbi
Quoted 16 lines · Daniel Mack
Quoted 15 lines · Felipe Balbi
Quoted 13 lines · Daniel Mack
Quoted 10 lines · Felipe Balbi

drivers/usb/musb/am35x.c static int am35x_resume(struct device *dev) · line 619

Quoted 5 lines · Daniel Mack
drivers/usb/musb/am35x.c +1 -4
-static struct dev_pm_ops am35x_pm_ops = {
-	.suspend	= am35x_suspend,
-	.resume		= am35x_resume,
-};
+static SIMPLE_DEV_PM_OPS(am35x_pm_ops, am35x_suspend, am35x_resume);

you could as well remove the DEV_PM_OPS trickery. Ditto for all other patches

Yes, I noticed that too. That's why I sent out a v2 of the series :)

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Awesome :-) Thanks dude

So are you happy with this v2?
It's just a cosmetic cleanup after all ...

I can't see v2 anywhere... The only version I have is the one with DEV_PM_OPS still in it.

Ok, I'll resend them later.

Daniel

#10 lore raw
In reply to Felipe Balbi

On 30.09.2013 18:25, Felipe Balbi wrote:

Quoted 4 lines · Daniel Mack
Quoted 2 lines

So are you happy with this v2?

Quoted 1 line

It's just a cosmetic cleanup after all ...

I can't see v2 anywhere... The only version I have is the one with DEV_PM_OPS still in it.

Seen them this time?

http://marc.info/?l=linux-usb&m=138056774812520&w=2
http://marc.info/?l=linux-usb&m=138056774612517&w=2
http://marc.info/?l=linux-usb&m=138056775012522&w=2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html