All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org,
	swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 4/5] i2c: tegra: Use struct dev_pm_ops for power management
Date: Thu, 12 Jul 2012 11:53:52 +0200	[thread overview]
Message-ID: <20120712095352.GD27520@pengutronix.de> (raw)
In-Reply-To: <1341919244-23327-5-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

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

On Tue, Jul 10, 2012 at 04:50:43PM +0530, Laxman Dewangan wrote:
> Make the tegra i2c driver define its PM callbacks through
> struct dev_pm_ops objects rather than by using legacy PM hooks
> in struct platform_driver.
> 
> Signed-off-by: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/i2c/busses/i2c-tegra.c |   19 +++++++++++++------
>  1 files changed, 13 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index 0792674..5f0572d 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
> @@ -713,8 +713,9 @@ static int __devexit tegra_i2c_remove(struct platform_device *pdev)
>  }
>  
>  #ifdef CONFIG_PM
> -static int tegra_i2c_suspend(struct platform_device *pdev, pm_message_t state)
> +static int tegra_i2c_suspend(struct device *dev)
>  {
> +	struct platform_device *pdev = to_platform_device(dev);
>  	struct tegra_i2c_dev *i2c_dev = platform_get_drvdata(pdev);

I like Rafael's patch better because of dev_get_drvdata. I'll pick his
and add your 5/5 on top of that.

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <w.sang@pengutronix.de>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: khali@linux-fr.org, ben-linux@fluff.org, swarren@nvidia.com,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-tegra@vger.kernel.org
Subject: Re: [PATCH 4/5] i2c: tegra: Use struct dev_pm_ops for power management
Date: Thu, 12 Jul 2012 11:53:52 +0200	[thread overview]
Message-ID: <20120712095352.GD27520@pengutronix.de> (raw)
In-Reply-To: <1341919244-23327-5-git-send-email-ldewangan@nvidia.com>

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

On Tue, Jul 10, 2012 at 04:50:43PM +0530, Laxman Dewangan wrote:
> Make the tegra i2c driver define its PM callbacks through
> struct dev_pm_ops objects rather than by using legacy PM hooks
> in struct platform_driver.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> ---
>  drivers/i2c/busses/i2c-tegra.c |   19 +++++++++++++------
>  1 files changed, 13 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index 0792674..5f0572d 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
> @@ -713,8 +713,9 @@ static int __devexit tegra_i2c_remove(struct platform_device *pdev)
>  }
>  
>  #ifdef CONFIG_PM
> -static int tegra_i2c_suspend(struct platform_device *pdev, pm_message_t state)
> +static int tegra_i2c_suspend(struct device *dev)
>  {
> +	struct platform_device *pdev = to_platform_device(dev);
>  	struct tegra_i2c_dev *i2c_dev = platform_get_drvdata(pdev);

I like Rafael's patch better because of dev_get_drvdata. I'll pick his
and add your 5/5 on top of that.

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

  parent reply	other threads:[~2012-07-12  9:53 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10 11:20 [PATCH 0/5] i2c: tegra: Code cleanups and suspend/resume related changes Laxman Dewangan
2012-07-10 11:20 ` Laxman Dewangan
2012-07-10 11:20 ` [PATCH 1/5] i2c: tegra: remove unused member variable Laxman Dewangan
2012-07-10 11:20   ` Laxman Dewangan
     [not found]   ` <1341919244-23327-2-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-10 11:33     ` Shubhrajyoti Datta
2012-07-10 11:33       ` Shubhrajyoti Datta
2012-07-10 11:20 ` [PATCH 2/5] i2c: tegra: use clk_disable_unprepare in place of clk_disable Laxman Dewangan
2012-07-10 11:20   ` Laxman Dewangan
     [not found]   ` <1341919244-23327-3-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-12  9:52     ` Wolfram Sang
2012-07-12  9:52       ` Wolfram Sang
2012-07-10 11:20 ` [PATCH 3/5] i2c: tegra: use of_match_ptr() for match_table initialization Laxman Dewangan
2012-07-10 11:20   ` Laxman Dewangan
     [not found]   ` <1341919244-23327-4-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-12  9:52     ` Wolfram Sang
2012-07-12  9:52       ` Wolfram Sang
2012-07-10 11:20 ` [PATCH 4/5] i2c: tegra: Use struct dev_pm_ops for power management Laxman Dewangan
2012-07-10 11:20   ` Laxman Dewangan
     [not found]   ` <1341919244-23327-5-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-12  9:53     ` Wolfram Sang [this message]
2012-07-12  9:53       ` Wolfram Sang
2012-07-10 11:20 ` [PATCH 5/5] i2c: tegra: convert normal suspend/resume to *_noirq Laxman Dewangan
2012-07-10 11:20   ` Laxman Dewangan
     [not found]   ` <1341919244-23327-6-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-12 10:35     ` Wolfram Sang
2012-07-12 10:35       ` Wolfram Sang
     [not found]       ` <20120712103509.GF27520-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-07-12 10:30         ` Laxman Dewangan
2012-07-12 10:30           ` Laxman Dewangan
     [not found]           ` <4FFEA748.9080109-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-12 11:58             ` Wolfram Sang
2012-07-12 11:58               ` Wolfram Sang
     [not found]               ` <20120712115725.GA3772-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-07-12 11:53                 ` Laxman Dewangan
2012-07-12 11:53                   ` Laxman Dewangan
2012-07-23 18:24   ` Stephen Warren
     [not found]     ` <500D96E6.4060507-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-07-24  9:13       ` Peter De Schrijver
2012-07-24  9:13         ` Peter De Schrijver
     [not found]         ` <20120724091358.GK12034-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org>
2012-07-24 12:52           ` Mark Brown
2012-07-24 12:52             ` Mark Brown
2012-07-24 15:29       ` Wolfram Sang
2012-07-24 15:29         ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120712095352.GD27520@pengutronix.de \
    --to=w.sang-bicnvbalz9megne8c9+irq@public.gmane.org \
    --cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.