diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-10-21 22:59:49 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-02-08 16:45:02 +0300 |
commit | bdf2466b259fb1676485e587ed286308ab79d970 (patch) | |
tree | ca147da4fc9d839b0edfe77f9f694884fdd38e30 /drivers/ata/pata_samsung_cf.c | |
parent | baac9ce1f333260485e9084809e909d3ce6c69dd (diff) | |
download | linux-bdf2466b259fb1676485e587ed286308ab79d970.tar.xz |
ata: pata_samsung_cf: simplify getting .driver_data
We should get 'driver_data' from 'struct device' directly. Going via
platform_device is an unneeded step back and forth.
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/ata/pata_samsung_cf.c')
-rw-r--r-- | drivers/ata/pata_samsung_cf.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/ata/pata_samsung_cf.c b/drivers/ata/pata_samsung_cf.c index f5bd44b8bd63..1dc3361cb5a5 100644 --- a/drivers/ata/pata_samsung_cf.c +++ b/drivers/ata/pata_samsung_cf.c @@ -609,17 +609,15 @@ static int __exit pata_s3c_remove(struct platform_device *pdev) #ifdef CONFIG_PM_SLEEP static int pata_s3c_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct ata_host *host = platform_get_drvdata(pdev); + struct ata_host *host = dev_get_drvdata(dev); return ata_host_suspend(host, PMSG_SUSPEND); } static int pata_s3c_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct ata_host *host = platform_get_drvdata(pdev); - struct s3c_ide_platdata *pdata = dev_get_platdata(&pdev->dev); + struct ata_host *host = dev_get_drvdata(dev); + struct s3c_ide_platdata *pdata = dev_get_platdata(dev); struct s3c_ide_info *info = host->private_data; pata_s3c_hwinit(info, pdata); |