diff mbox series

[5/5] fpga: dfl-fme-region: Use platform_get_drvdata()

Message ID 20180912144327.3130-6-atull@kernel.org (mailing list archive)
State Superseded, archived
Headers show
Series fpga: patches for v4.19 | expand

Commit Message

Alan Tull Sept. 12, 2018, 2:43 p.m. UTC
From: Moritz Fischer <mdf@kernel.org>

Use platform_get_drvdata() in remove() function of
the platform driver rather than dev_get_drvdata()
to match the platform_set_drvdata in the probe().

Signed-off-by: Moritz Fischer <mdf@kernel.org>
Acked-by: Alan Tull <atull@kernel.org>
---
 drivers/fpga/dfl-fme-region.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Greg Kroah-Hartman Sept. 30, 2018, 3:48 p.m. UTC | #1
On Wed, Sep 12, 2018 at 09:43:27AM -0500, Alan Tull wrote:
> From: Moritz Fischer <mdf@kernel.org>
> 
> Use platform_get_drvdata() in remove() function of
> the platform driver rather than dev_get_drvdata()
> to match the platform_set_drvdata in the probe().
> 
> Signed-off-by: Moritz Fischer <mdf@kernel.org>
> Acked-by: Alan Tull <atull@kernel.org>
> ---
>  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 51a5ac2..3fa0de2 100644
> --- a/drivers/fpga/dfl-fme-region.c
> +++ b/drivers/fpga/dfl-fme-region.c
> @@ -66,7 +66,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);

This is nice, but not a bugfix.  I'll wait for 4.20-rc1 for this patch.

thanks,

greg k-h
Alan Tull Nov. 12, 2018, 3:46 p.m. UTC | #2
On Sun, Sep 30, 2018 at 10:48 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:

Hi Greg,

>
> On Wed, Sep 12, 2018 at 09:43:27AM -0500, Alan Tull wrote:
> > From: Moritz Fischer <mdf@kernel.org>
> >
> > Use platform_get_drvdata() in remove() function of
> > the platform driver rather than dev_get_drvdata()
> > to match the platform_set_drvdata in the probe().
> >
> > Signed-off-by: Moritz Fischer <mdf@kernel.org>
> > Acked-by: Alan Tull <atull@kernel.org>
> > ---
> >  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 51a5ac2..3fa0de2 100644
> > --- a/drivers/fpga/dfl-fme-region.c
> > +++ b/drivers/fpga/dfl-fme-region.c
> > @@ -66,7 +66,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);
>
> This is nice, but not a bugfix.  I'll wait for 4.20-rc1 for this patch.

Could you take patch 4/5 and 5/5?  They didn't make it into a 4.20 rc yet.

Alan

>
> thanks,
>
> greg k-h
Greg Kroah-Hartman Nov. 12, 2018, 6:02 p.m. UTC | #3
On Mon, Nov 12, 2018 at 09:46:53AM -0600, Alan Tull wrote:
> On Sun, Sep 30, 2018 at 10:48 AM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> 
> Hi Greg,
> 
> >
> > On Wed, Sep 12, 2018 at 09:43:27AM -0500, Alan Tull wrote:
> > > From: Moritz Fischer <mdf@kernel.org>
> > >
> > > Use platform_get_drvdata() in remove() function of
> > > the platform driver rather than dev_get_drvdata()
> > > to match the platform_set_drvdata in the probe().
> > >
> > > Signed-off-by: Moritz Fischer <mdf@kernel.org>
> > > Acked-by: Alan Tull <atull@kernel.org>
> > > ---
> > >  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 51a5ac2..3fa0de2 100644
> > > --- a/drivers/fpga/dfl-fme-region.c
> > > +++ b/drivers/fpga/dfl-fme-region.c
> > > @@ -66,7 +66,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);
> >
> > This is nice, but not a bugfix.  I'll wait for 4.20-rc1 for this patch.
> 
> Could you take patch 4/5 and 5/5?  They didn't make it into a 4.20 rc yet.

Can you resend them please?  I don't see either of these in my queue
anywhere.

thanks,

greg k-h
Alan Tull Nov. 12, 2018, 7:39 p.m. UTC | #4
On Mon, Nov 12, 2018 at 12:02 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Mon, Nov 12, 2018 at 09:46:53AM -0600, Alan Tull wrote:
> > On Sun, Sep 30, 2018 at 10:48 AM Greg Kroah-Hartman
> > <gregkh@linuxfoundation.org> wrote:
> >
> > Hi Greg,
> >
> > >
> > > On Wed, Sep 12, 2018 at 09:43:27AM -0500, Alan Tull wrote:
> > > > From: Moritz Fischer <mdf@kernel.org>
> > > >
> > > > Use platform_get_drvdata() in remove() function of
> > > > the platform driver rather than dev_get_drvdata()
> > > > to match the platform_set_drvdata in the probe().
> > > >
> > > > Signed-off-by: Moritz Fischer <mdf@kernel.org>
> > > > Acked-by: Alan Tull <atull@kernel.org>
> > > > ---
> > > >  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 51a5ac2..3fa0de2 100644
> > > > --- a/drivers/fpga/dfl-fme-region.c
> > > > +++ b/drivers/fpga/dfl-fme-region.c
> > > > @@ -66,7 +66,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);
> > >
> > > This is nice, but not a bugfix.  I'll wait for 4.20-rc1 for this patch.
> >
> > Could you take patch 4/5 and 5/5?  They didn't make it into a 4.20 rc yet.
>
> Can you resend them please?  I don't see either of these in my queue
> anywhere.
>
> thanks,
>
> greg k-h

Sure! Just sent them.

Thanks,
Alan
diff mbox series

Patch

diff --git a/drivers/fpga/dfl-fme-region.c b/drivers/fpga/dfl-fme-region.c
index 51a5ac2..3fa0de2 100644
--- a/drivers/fpga/dfl-fme-region.c
+++ b/drivers/fpga/dfl-fme-region.c
@@ -66,7 +66,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);
 	struct fpga_manager *mgr = region->mgr;
 
 	fpga_region_unregister(region);