linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] usb: musb: am35x: use SIMPLE_DEV_PM_OPS
@ 2013-09-22 11:46 Daniel Mack
  2013-09-22 11:46 ` [PATCH 2/4] usb: musb: blackfin: " Daniel Mack
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Daniel Mack @ 2013-09-22 11:46 UTC (permalink / raw)
  To: linux-ubs; +Cc: balbi, linux-omap, gregkh, 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

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 drivers/usb/musb/am35x.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c
index 5c310c6..df32a29 100644
--- a/drivers/usb/musb/am35x.c
+++ b/drivers/usb/musb/am35x.c
@@ -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
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/4] usb: musb: blackfin: use SIMPLE_DEV_PM_OPS
  2013-09-22 11:46 [PATCH 1/4] usb: musb: am35x: use SIMPLE_DEV_PM_OPS Daniel Mack
@ 2013-09-22 11:46 ` Daniel Mack
  2013-09-22 11:47 ` [PATCH 3/4] usb: musb: omap2430: " Daniel Mack
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Daniel Mack @ 2013-09-22 11:46 UTC (permalink / raw)
  To: linux-ubs; +Cc: balbi, linux-omap, gregkh, Daniel Mack

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

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 drivers/usb/musb/blackfin.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index 72e2056..7db75c9 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
@@ -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
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/4] usb: musb: omap2430: use SIMPLE_DEV_PM_OPS
  2013-09-22 11:46 [PATCH 1/4] usb: musb: am35x: use SIMPLE_DEV_PM_OPS Daniel Mack
  2013-09-22 11:46 ` [PATCH 2/4] usb: musb: blackfin: " Daniel Mack
@ 2013-09-22 11:47 ` Daniel Mack
  2013-09-22 11:47 ` [PATCH 4/4] usb: musb: ux500: " Daniel Mack
  2013-09-23 21:20 ` [PATCH 1/4] usb: musb: am35x: " Felipe Balbi
  3 siblings, 0 replies; 11+ messages in thread
From: Daniel Mack @ 2013-09-22 11:47 UTC (permalink / raw)
  To: linux-ubs; +Cc: balbi, linux-omap, gregkh, Daniel Mack

This makes omap2430_pm_ops const.

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 drivers/usb/musb/omap2430.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 59d2245..ef53737 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -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
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/4] usb: musb: ux500: use SIMPLE_DEV_PM_OPS
  2013-09-22 11:46 [PATCH 1/4] usb: musb: am35x: use SIMPLE_DEV_PM_OPS Daniel Mack
  2013-09-22 11:46 ` [PATCH 2/4] usb: musb: blackfin: " Daniel Mack
  2013-09-22 11:47 ` [PATCH 3/4] usb: musb: omap2430: " Daniel Mack
@ 2013-09-22 11:47 ` Daniel Mack
  2013-09-23 21:20 ` [PATCH 1/4] usb: musb: am35x: " Felipe Balbi
  3 siblings, 0 replies; 11+ messages in thread
From: Daniel Mack @ 2013-09-22 11:47 UTC (permalink / raw)
  To: linux-ubs; +Cc: balbi, linux-omap, gregkh, Daniel Mack

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

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 drivers/usb/musb/ux500.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c
index 59256b1..819b884 100644
--- a/drivers/usb/musb/ux500.c
+++ b/drivers/usb/musb/ux500.c
@@ -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
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/4] usb: musb: am35x: use SIMPLE_DEV_PM_OPS
  2013-09-22 11:46 [PATCH 1/4] usb: musb: am35x: use SIMPLE_DEV_PM_OPS Daniel Mack
                   ` (2 preceding siblings ...)
  2013-09-22 11:47 ` [PATCH 4/4] usb: musb: ux500: " Daniel Mack
@ 2013-09-23 21:20 ` Felipe Balbi
  2013-09-24  6:57   ` Daniel Mack
  3 siblings, 1 reply; 11+ messages in thread
From: Felipe Balbi @ 2013-09-23 21:20 UTC (permalink / raw)
  To: Daniel Mack; +Cc: linux-ubs, balbi, linux-omap, gregkh

[-- Attachment #1: Type: text/plain, Size: 949 bytes --]

Hi,

On Sun, Sep 22, 2013 at 01:46:58PM +0200, Daniel Mack wrote:
> 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
> 
> Signed-off-by: Daniel Mack <zonque@gmail.com>
> ---
>  drivers/usb/musb/am35x.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c
> index 5c310c6..df32a29 100644
> --- a/drivers/usb/musb/am35x.c
> +++ b/drivers/usb/musb/am35x.c
> @@ -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

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/4] usb: musb: am35x: use SIMPLE_DEV_PM_OPS
  2013-09-23 21:20 ` [PATCH 1/4] usb: musb: am35x: " Felipe Balbi
@ 2013-09-24  6:57   ` Daniel Mack
  2013-09-25 13:48     ` Felipe Balbi
  0 siblings, 1 reply; 11+ messages in thread
From: Daniel Mack @ 2013-09-24  6:57 UTC (permalink / raw)
  To: balbi; +Cc: linux-ubs, linux-omap, gregkh

On 23.09.2013 23:20, Felipe Balbi wrote:
> On Sun, Sep 22, 2013 at 01:46:58PM +0200, Daniel Mack wrote:

>> -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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/4] usb: musb: am35x: use SIMPLE_DEV_PM_OPS
  2013-09-24  6:57   ` Daniel Mack
@ 2013-09-25 13:48     ` Felipe Balbi
  2013-09-27 18:47       ` Daniel Mack
  0 siblings, 1 reply; 11+ messages in thread
From: Felipe Balbi @ 2013-09-25 13:48 UTC (permalink / raw)
  To: Daniel Mack; +Cc: balbi, linux-ubs, linux-omap, gregkh

[-- Attachment #1: Type: text/plain, Size: 589 bytes --]

On Tue, Sep 24, 2013 at 08:57:08AM +0200, Daniel Mack wrote:
> On 23.09.2013 23:20, Felipe Balbi wrote:
> > On Sun, Sep 22, 2013 at 01:46:58PM +0200, Daniel Mack wrote:
> 
> >> -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 :)

Awesome :-) Thanks dude

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/4] usb: musb: am35x: use SIMPLE_DEV_PM_OPS
  2013-09-25 13:48     ` Felipe Balbi
@ 2013-09-27 18:47       ` Daniel Mack
  2013-09-30 16:25         ` Felipe Balbi
  0 siblings, 1 reply; 11+ messages in thread
From: Daniel Mack @ 2013-09-27 18:47 UTC (permalink / raw)
  To: balbi; +Cc: linux-ubs, linux-omap, gregkh

On 25.09.2013 15:48, Felipe Balbi wrote:
> On Tue, Sep 24, 2013 at 08:57:08AM +0200, Daniel Mack wrote:
>> On 23.09.2013 23:20, Felipe Balbi wrote:
>>> On Sun, Sep 22, 2013 at 01:46:58PM +0200, Daniel Mack wrote:
>>
>>>> -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 :)
> 
> Awesome :-) Thanks dude

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


Thanks,
Daniel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/4] usb: musb: am35x: use SIMPLE_DEV_PM_OPS
  2013-09-27 18:47       ` Daniel Mack
@ 2013-09-30 16:25         ` Felipe Balbi
  2013-09-30 16:56           ` Daniel Mack
  2013-10-02  8:10           ` Daniel Mack
  0 siblings, 2 replies; 11+ messages in thread
From: Felipe Balbi @ 2013-09-30 16:25 UTC (permalink / raw)
  To: Daniel Mack; +Cc: balbi, linux-ubs, linux-omap, gregkh

[-- Attachment #1: Type: text/plain, Size: 920 bytes --]

Hi,

On Fri, Sep 27, 2013 at 08:47:10PM +0200, Daniel Mack wrote:
> On 25.09.2013 15:48, Felipe Balbi wrote:
> > On Tue, Sep 24, 2013 at 08:57:08AM +0200, Daniel Mack wrote:
> >> On 23.09.2013 23:20, Felipe Balbi wrote:
> >>> On Sun, Sep 22, 2013 at 01:46:58PM +0200, Daniel Mack wrote:
> >>
> >>>> -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 :)
> > 
> > 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.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/4] usb: musb: am35x: use SIMPLE_DEV_PM_OPS
  2013-09-30 16:25         ` Felipe Balbi
@ 2013-09-30 16:56           ` Daniel Mack
  2013-10-02  8:10           ` Daniel Mack
  1 sibling, 0 replies; 11+ messages in thread
From: Daniel Mack @ 2013-09-30 16:56 UTC (permalink / raw)
  To: balbi; +Cc: linux-ubs, linux-omap, gregkh

On 30.09.2013 18:25, Felipe Balbi wrote:
> On Fri, Sep 27, 2013 at 08:47:10PM +0200, Daniel Mack wrote:
>> On 25.09.2013 15:48, Felipe Balbi wrote:
>>> On Tue, Sep 24, 2013 at 08:57:08AM +0200, Daniel Mack wrote:
>>>> On 23.09.2013 23:20, Felipe Balbi wrote:
>>>>> On Sun, Sep 22, 2013 at 01:46:58PM +0200, Daniel Mack wrote:
>>>>
>>>>>> -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 :)
>>>
>>> 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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/4] usb: musb: am35x: use SIMPLE_DEV_PM_OPS
  2013-09-30 16:25         ` Felipe Balbi
  2013-09-30 16:56           ` Daniel Mack
@ 2013-10-02  8:10           ` Daniel Mack
  1 sibling, 0 replies; 11+ messages in thread
From: Daniel Mack @ 2013-10-02  8:10 UTC (permalink / raw)
  To: balbi-l0cyMroinI0
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r

On 30.09.2013 18:25, Felipe Balbi wrote:
On Fri, Sep 27, 2013 at 08:47:10PM +0200, Daniel Mack wrote:

>> 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.

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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-10-02  8:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-22 11:46 [PATCH 1/4] usb: musb: am35x: use SIMPLE_DEV_PM_OPS Daniel Mack
2013-09-22 11:46 ` [PATCH 2/4] usb: musb: blackfin: " Daniel Mack
2013-09-22 11:47 ` [PATCH 3/4] usb: musb: omap2430: " Daniel Mack
2013-09-22 11:47 ` [PATCH 4/4] usb: musb: ux500: " Daniel Mack
2013-09-23 21:20 ` [PATCH 1/4] usb: musb: am35x: " Felipe Balbi
2013-09-24  6:57   ` Daniel Mack
2013-09-25 13:48     ` Felipe Balbi
2013-09-27 18:47       ` Daniel Mack
2013-09-30 16:25         ` Felipe Balbi
2013-09-30 16:56           ` Daniel Mack
2013-10-02  8:10           ` Daniel Mack

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).