linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] fpga: dfl: region: Restory symmetry in probe()/remove()
@ 2018-08-20 17:18 Moritz Fischer
  2018-08-20 17:46 ` Alan Tull
  0 siblings, 1 reply; 4+ messages in thread
From: Moritz Fischer @ 2018-08-20 17:18 UTC (permalink / raw)
  To: hao.wu; +Cc: atull, linux-fpga, linux-kernel, Moritz Fischer

Replace dev_get_drvdata() with platform_get_drvdata() to
match the platform_set_drvdata() in the probe function of
the platform driver.

Fixes commit bb61b9be3e6b ("fpga: dfl: add fpga region platform driver for FME")
Signed-off-by: Moritz Fischer <mdf@kernel.org>
---

Changes from v1:
- Still compile after change ...

---
 drivers/fpga/dfl-fme-region.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/fpga/dfl-fme-region.c b/drivers/fpga/dfl-fme-region.c
index 0b7e19c27c6d..11d3c23a8936 100644
--- a/drivers/fpga/dfl-fme-region.c
+++ b/drivers/fpga/dfl-fme-region.c
@@ -65,7 +65,7 @@ static int fme_region_probe(struct platform_device *pdev)
 
 static int fme_region_remove(struct platform_device *pdev)
 {
-	struct fpga_region *region = dev_get_drvdata(&pdev->dev);
+	struct fpga_region *region = platform_get_drvdata(pdev);
 
 	fpga_region_unregister(region);
 	fpga_mgr_put(region->mgr);
-- 
2.18.0

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

* Re: [PATCH v2] fpga: dfl: region: Restory symmetry in probe()/remove()
  2018-08-20 17:18 [PATCH v2] fpga: dfl: region: Restory symmetry in probe()/remove() Moritz Fischer
@ 2018-08-20 17:46 ` Alan Tull
  2018-08-20 17:54   ` Moritz Fischer
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Tull @ 2018-08-20 17:46 UTC (permalink / raw)
  To: Moritz Fischer; +Cc: Wu Hao, linux-fpga, linux-kernel

On Mon, Aug 20, 2018 at 12:18 PM, Moritz Fischer <mdf@kernel.org> wrote:

Hi Moritz,

> Replace dev_get_drvdata() with platform_get_drvdata() to
> match the platform_set_drvdata() in the probe function of
> the platform driver.
>
> Fixes commit bb61b9be3e6b ("fpga: dfl: add fpga region platform driver for FME")
> Signed-off-by: Moritz Fischer <mdf@kernel.org>
> ---
>
> Changes from v1:
> - Still compile after change ...
>
> ---
>  drivers/fpga/dfl-fme-region.c | 2 +-

Thanks for catching this.  of-fpga-region.c does a similar thing and
needs s/dev_set_drvdata/platform_set_drvdata/ in the probe.  Could you
fix it here too?

Alan

>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/fpga/dfl-fme-region.c b/drivers/fpga/dfl-fme-region.c
> index 0b7e19c27c6d..11d3c23a8936 100644
> --- a/drivers/fpga/dfl-fme-region.c
> +++ b/drivers/fpga/dfl-fme-region.c
> @@ -65,7 +65,7 @@ static int fme_region_probe(struct platform_device *pdev)
>
>  static int fme_region_remove(struct platform_device *pdev)
>  {
> -       struct fpga_region *region = dev_get_drvdata(&pdev->dev);
> +       struct fpga_region *region = platform_get_drvdata(pdev);
>
>         fpga_region_unregister(region);
>         fpga_mgr_put(region->mgr);
> --
> 2.18.0
>

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

* Re: [PATCH v2] fpga: dfl: region: Restory symmetry in probe()/remove()
  2018-08-20 17:46 ` Alan Tull
@ 2018-08-20 17:54   ` Moritz Fischer
  2018-08-20 18:04     ` Alan Tull
  0 siblings, 1 reply; 4+ messages in thread
From: Moritz Fischer @ 2018-08-20 17:54 UTC (permalink / raw)
  To: Alan Tull; +Cc: Moritz Fischer, Wu Hao, linux-fpga, linux-kernel

Hi Alan,

On Mon, Aug 20, 2018 at 12:46:32PM -0500, Alan Tull wrote:
> On Mon, Aug 20, 2018 at 12:18 PM, Moritz Fischer <mdf@kernel.org> wrote:
> 
> Hi Moritz,
> 
> > Replace dev_get_drvdata() with platform_get_drvdata() to
> > match the platform_set_drvdata() in the probe function of
> > the platform driver.
> >
> > Fixes commit bb61b9be3e6b ("fpga: dfl: add fpga region platform driver for FME")
> > Signed-off-by: Moritz Fischer <mdf@kernel.org>
> > ---
> >
> > Changes from v1:
> > - Still compile after change ...
> >
> > ---
> >  drivers/fpga/dfl-fme-region.c | 2 +-
> 
> Thanks for catching this.  of-fpga-region.c does a similar thing and
> needs s/dev_set_drvdata/platform_set_drvdata/ in the probe.  Could you
> fix it here too?

Yeah, can do in a v3 series ... Will add your Suggested-by: ...

Cheers,

Moritz

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

* Re: [PATCH v2] fpga: dfl: region: Restory symmetry in probe()/remove()
  2018-08-20 17:54   ` Moritz Fischer
@ 2018-08-20 18:04     ` Alan Tull
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Tull @ 2018-08-20 18:04 UTC (permalink / raw)
  To: Moritz Fischer; +Cc: Wu Hao, linux-fpga, linux-kernel

On Mon, Aug 20, 2018 at 12:54 PM, Moritz Fischer <mdf@kernel.org> wrote:
> Hi Alan,
>
> On Mon, Aug 20, 2018 at 12:46:32PM -0500, Alan Tull wrote:
>> On Mon, Aug 20, 2018 at 12:18 PM, Moritz Fischer <mdf@kernel.org> wrote:
>>
>> Hi Moritz,
>>
>> > Replace dev_get_drvdata() with platform_get_drvdata() to
>> > match the platform_set_drvdata() in the probe function of
>> > the platform driver.
>> >
>> > Fixes commit bb61b9be3e6b ("fpga: dfl: add fpga region platform driver for FME")
>> > Signed-off-by: Moritz Fischer <mdf@kernel.org>
>> > ---
>> >
>> > Changes from v1:
>> > - Still compile after change ...
>> >
>> > ---
>> >  drivers/fpga/dfl-fme-region.c | 2 +-
>>
>> Thanks for catching this.  of-fpga-region.c does a similar thing and
>> needs s/dev_set_drvdata/platform_set_drvdata/ in the probe.  Could you
>> fix it here too?

Actually I should have said something more like
s/dev_set_drvdata(dev/platform_set_drvdata(pdev/

>
> Yeah, can do in a v3 series ... Will add your Suggested-by: ...

Thanks!

>
> Cheers,
>
> Moritz

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

end of thread, other threads:[~2018-08-20 18:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-20 17:18 [PATCH v2] fpga: dfl: region: Restory symmetry in probe()/remove() Moritz Fischer
2018-08-20 17:46 ` Alan Tull
2018-08-20 17:54   ` Moritz Fischer
2018-08-20 18:04     ` Alan Tull

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