diff mbox

[3/3] spi: sirf: Use SIMPLE_DEV_PM_OPS macro

Message ID 003a01cf3292$a85069d0$f8f13d70$%han@samsung.com (mailing list archive)
State Accepted
Commit 71aa2e3207ad3249b4a7ceff7ca775a08341fdcb
Headers show

Commit Message

Jingoo Han Feb. 26, 2014, 1:32 a.m. UTC
Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/spi/spi-sirf.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Barry Song Feb. 26, 2014, 8:32 a.m. UTC | #1
2014-02-26 9:32 GMT+08:00 Jingoo Han <jg1.han@samsung.com>:
> Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

thanks, but this has been done and merged.

> ---
>  drivers/spi/spi-sirf.c |    5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c
> index 5210b94..dc962a1 100644
> --- a/drivers/spi/spi-sirf.c
> +++ b/drivers/spi/spi-sirf.c
> @@ -718,9 +718,8 @@ static int spi_sirfsoc_resume(struct device *dev)
>  }
>  #endif
>
> -static const struct dev_pm_ops spi_sirfsoc_pm_ops = {
> -       SET_SYSTEM_SLEEP_PM_OPS(spi_sirfsoc_suspend, spi_sirfsoc_resume)
> -};
> +static SIMPLE_DEV_PM_OPS(spi_sirfsoc_pm_ops, spi_sirfsoc_suspend,
> +                        spi_sirfsoc_resume);
>
>  static const struct of_device_id spi_sirfsoc_of_match[] = {
>         { .compatible = "sirf,prima2-spi", },
> --
> 1.7.10.4
>
>
-barry
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jingoo Han Feb. 26, 2014, 8:55 a.m. UTC | #2
On Wednesday, February 26, 2014 5:32 PM, Barry Song wrote:
> 2014-02-26 9:32 GMT+08:00 Jingoo Han <jg1.han@samsung.com>:
> > Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.
> >
> > Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> 
> thanks, but this has been done and merged.

Thank you for your comment. However I have a question. :-)

My patch replaces 'SET_SYSTEM_SLEEP_PM_OPS' with 'SIMPLE_DEV_PM_OPS'.
However, I cannot find the same patch in SPI mailing-list.
Would you let me know how to find the same patch that was submitted
earlier?

Best regards,
Jingoo Han

> 
> > ---
> >  drivers/spi/spi-sirf.c |    5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c
> > index 5210b94..dc962a1 100644
> > --- a/drivers/spi/spi-sirf.c
> > +++ b/drivers/spi/spi-sirf.c
> > @@ -718,9 +718,8 @@ static int spi_sirfsoc_resume(struct device *dev)
> >  }
> >  #endif
> >
> > -static const struct dev_pm_ops spi_sirfsoc_pm_ops = {
> > -       SET_SYSTEM_SLEEP_PM_OPS(spi_sirfsoc_suspend, spi_sirfsoc_resume)
> > -};
> > +static SIMPLE_DEV_PM_OPS(spi_sirfsoc_pm_ops, spi_sirfsoc_suspend,
> > +                        spi_sirfsoc_resume);
> >
> >  static const struct of_device_id spi_sirfsoc_of_match[] = {
> >         { .compatible = "sirf,prima2-spi", },
> > --
> > 1.7.10.4
> >
> >
> -barry

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Barry Song Feb. 26, 2014, 9:05 a.m. UTC | #3
2014-02-26 16:55 GMT+08:00 Jingoo Han <jg1.han@samsung.com>:
> On Wednesday, February 26, 2014 5:32 PM, Barry Song wrote:
>> 2014-02-26 9:32 GMT+08:00 Jingoo Han <jg1.han@samsung.com>:
>> > Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.
>> >
>> > Signed-off-by: Jingoo Han <jg1.han@samsung.com>
>>
>> thanks, but this has been done and merged.
>
> Thank you for your comment. However I have a question. :-)
>
> My patch replaces 'SET_SYSTEM_SLEEP_PM_OPS' with 'SIMPLE_DEV_PM_OPS'.
> However, I cannot find the same patch in SPI mailing-list.
> Would you let me know how to find the same patch that was submitted
> earlier?

sorry, i misunderstood your patch.

Acked-by: Barry Song <Baohua.Song@csr.com>

thanks a lot!

>
> Best regards,
> Jingoo Han
>
>>
>> > ---
>> >  drivers/spi/spi-sirf.c |    5 ++---
>> >  1 file changed, 2 insertions(+), 3 deletions(-)
>> >
>> > diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c
>> > index 5210b94..dc962a1 100644
>> > --- a/drivers/spi/spi-sirf.c
>> > +++ b/drivers/spi/spi-sirf.c
>> > @@ -718,9 +718,8 @@ static int spi_sirfsoc_resume(struct device *dev)
>> >  }
>> >  #endif
>> >
>> > -static const struct dev_pm_ops spi_sirfsoc_pm_ops = {
>> > -       SET_SYSTEM_SLEEP_PM_OPS(spi_sirfsoc_suspend, spi_sirfsoc_resume)
>> > -};
>> > +static SIMPLE_DEV_PM_OPS(spi_sirfsoc_pm_ops, spi_sirfsoc_suspend,
>> > +                        spi_sirfsoc_resume);
>> >
>> >  static const struct of_device_id spi_sirfsoc_of_match[] = {
>> >         { .compatible = "sirf,prima2-spi", },
>> > --
>> > 1.7.10.4
>> >
>> >
>> -barry


-barry
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Brown Feb. 27, 2014, 4:41 a.m. UTC | #4
On Wed, Feb 26, 2014 at 10:32:48AM +0900, Jingoo Han wrote:
> Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.

applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c
index 5210b94..dc962a1 100644
--- a/drivers/spi/spi-sirf.c
+++ b/drivers/spi/spi-sirf.c
@@ -718,9 +718,8 @@  static int spi_sirfsoc_resume(struct device *dev)
 }
 #endif
 
-static const struct dev_pm_ops spi_sirfsoc_pm_ops = {
-	SET_SYSTEM_SLEEP_PM_OPS(spi_sirfsoc_suspend, spi_sirfsoc_resume)
-};
+static SIMPLE_DEV_PM_OPS(spi_sirfsoc_pm_ops, spi_sirfsoc_suspend,
+			 spi_sirfsoc_resume);
 
 static const struct of_device_id spi_sirfsoc_of_match[] = {
 	{ .compatible = "sirf,prima2-spi", },