Message ID | 20181021200032.1833-2-wsa+renesas@sang-engineering.com |
---|---|
State | New |
Headers | show |
Series | pinctrl: simplify getting .driver_data | expand |
On Sun, Oct 21, 2018 at 10:00:27PM +0200, Wolfram Sang wrote: > We should get 'driver_data' from 'struct device' directly. Going via > platform_device is an unneeded step back and forth. > Thanks! I see only 3 out of 5 patches. Since we are about to establish a separate tree as well as an additional record in MAINTAINERS data base for Intel pinctrl driver, I ask you to resend only Intel related stuff in a separate series. > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> > --- > > Build tested only. buildbot is happy. > > drivers/pinctrl/intel/pinctrl-baytrail.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c > index 6d1a43c0c251..a1c2548123a1 100644 > --- a/drivers/pinctrl/intel/pinctrl-baytrail.c > +++ b/drivers/pinctrl/intel/pinctrl-baytrail.c > @@ -1838,8 +1838,7 @@ static int byt_pinctrl_probe(struct platform_device *pdev) > #ifdef CONFIG_PM_SLEEP > static int byt_gpio_suspend(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct byt_gpio *vg = platform_get_drvdata(pdev); > + struct byt_gpio *vg = dev_get_drvdata(dev); > int i; > > for (i = 0; i < vg->soc_data->npins; i++) { > @@ -1867,8 +1866,7 @@ static int byt_gpio_suspend(struct device *dev) > > static int byt_gpio_resume(struct device *dev) > { > - struct platform_device *pdev = to_platform_device(dev); > - struct byt_gpio *vg = platform_get_drvdata(pdev); > + struct byt_gpio *vg = dev_get_drvdata(dev); > int i; > > for (i = 0; i < vg->soc_data->npins; i++) { > -- > 2.19.0 >
On Mon, Oct 22, 2018 at 12:19:51AM +0300, Andy Shevchenko wrote: > On Sun, Oct 21, 2018 at 10:00:27PM +0200, Wolfram Sang wrote: > > We should get 'driver_data' from 'struct device' directly. Going via > > platform_device is an unneeded step back and forth. > > > > Thanks! > > I see only 3 out of 5 patches. > > Since we are about to establish a separate tree as well as an additional record > in MAINTAINERS data base for Intel pinctrl driver, I ask you to resend only > Intel related stuff in a separate series. Well, it is easy enough to apply to our tree even if part of larger series :) So no need to resend anything IMHO. Looks good to me, Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
On Mon, Oct 22, 2018 at 11:51 AM Mika Westerberg <mika.westerberg@linux.intel.com> wrote: > On Mon, Oct 22, 2018 at 12:19:51AM +0300, Andy Shevchenko wrote: > > On Sun, Oct 21, 2018 at 10:00:27PM +0200, Wolfram Sang wrote: > > > We should get 'driver_data' from 'struct device' directly. Going via > > > platform_device is an unneeded step back and forth. > > Thanks! > > > > I see only 3 out of 5 patches. > > > > Since we are about to establish a separate tree as well as an additional record > > in MAINTAINERS data base for Intel pinctrl driver, I ask you to resend only > > Intel related stuff in a separate series. > > Well, it is easy enough to apply to our tree even if part of larger > series :) So no need to resend anything IMHO. I think it's slightly harder to sort things out for the more complex series, anyway, I'm right now talking to Wolfram and he shared how he did this series. The split is based on records in MAINTAINERS data base, that's why we have non-Intel parts there. Whenever we push new record, this automatically fixes the split. > Looks good to me, > > Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Thanks!
On Sun, Oct 21, 2018 at 10:00 PM Wolfram Sang <wsa+renesas@sang-engineering.com> wrote: > We should get 'driver_data' from 'struct device' directly. Going via > platform_device is an unneeded step back and forth. > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> for all 3 Intel patches Andy is collecting Intel pin control patches so he will pick these 3 up I think, let me know if all works out! Yours, Linus Walleij
diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c index 6d1a43c0c251..a1c2548123a1 100644 --- a/drivers/pinctrl/intel/pinctrl-baytrail.c +++ b/drivers/pinctrl/intel/pinctrl-baytrail.c @@ -1838,8 +1838,7 @@ static int byt_pinctrl_probe(struct platform_device *pdev) #ifdef CONFIG_PM_SLEEP static int byt_gpio_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct byt_gpio *vg = platform_get_drvdata(pdev); + struct byt_gpio *vg = dev_get_drvdata(dev); int i; for (i = 0; i < vg->soc_data->npins; i++) { @@ -1867,8 +1866,7 @@ static int byt_gpio_suspend(struct device *dev) static int byt_gpio_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct byt_gpio *vg = platform_get_drvdata(pdev); + struct byt_gpio *vg = dev_get_drvdata(dev); int i; for (i = 0; i < vg->soc_data->npins; i++) {
We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> --- Build tested only. buildbot is happy. drivers/pinctrl/intel/pinctrl-baytrail.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)