Commit bdf2466b authored by Wolfram Sang's avatar Wolfram Sang Committed by Jens Axboe

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: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent baac9ce1
...@@ -609,17 +609,15 @@ static int __exit pata_s3c_remove(struct platform_device *pdev) ...@@ -609,17 +609,15 @@ static int __exit pata_s3c_remove(struct platform_device *pdev)
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
static int pata_s3c_suspend(struct device *dev) static int pata_s3c_suspend(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct ata_host *host = dev_get_drvdata(dev);
struct ata_host *host = platform_get_drvdata(pdev);
return ata_host_suspend(host, PMSG_SUSPEND); return ata_host_suspend(host, PMSG_SUSPEND);
} }
static int pata_s3c_resume(struct device *dev) static int pata_s3c_resume(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev); struct ata_host *host = dev_get_drvdata(dev);
struct ata_host *host = platform_get_drvdata(pdev); struct s3c_ide_platdata *pdata = dev_get_platdata(dev);
struct s3c_ide_platdata *pdata = dev_get_platdata(&pdev->dev);
struct s3c_ide_info *info = host->private_data; struct s3c_ide_info *info = host->private_data;
pata_s3c_hwinit(info, pdata); pata_s3c_hwinit(info, pdata);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment