lkml.org 
[lkml]   [2018]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] fpga: dfl-fme-region: Use platform_get_drvdata()
On Fri, Aug 24, 2018 at 08:25:13AM -0700, Moritz Fischer wrote:
> 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().

Hi Moritz,

Thanks for this patch, it looks good to me. : )

Hao

>
> Signed-off-by: Moritz Fischer <mdf@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 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

\
 
 \ /
  Last update: 2018-08-24 20:30    [W:0.054 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site