diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-05-23 06:35:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-30 08:46:15 -0400 |
commit | 9093ca8891e238adc323629d69aaae379fd38bb0 (patch) | |
tree | 948ddc6a63c685b400bfcaa297688917e42f1031 /drivers/misc/carma/carma-fpga.c | |
parent | c6148f8f8ceb18fd6ae3b637c56e8327b73873eb (diff) |
misc: use platform_{get,set}_drvdata()
Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/carma/carma-fpga.c')
-rw-r--r-- | drivers/misc/carma/carma-fpga.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/carma/carma-fpga.c b/drivers/misc/carma/carma-fpga.c index 7508cafff103..a2128af706b2 100644 --- a/drivers/misc/carma/carma-fpga.c +++ b/drivers/misc/carma/carma-fpga.c | |||
@@ -1296,7 +1296,7 @@ static int data_of_probe(struct platform_device *op) | |||
1296 | goto out_return; | 1296 | goto out_return; |
1297 | } | 1297 | } |
1298 | 1298 | ||
1299 | dev_set_drvdata(&op->dev, priv); | 1299 | platform_set_drvdata(op, priv); |
1300 | priv->dev = &op->dev; | 1300 | priv->dev = &op->dev; |
1301 | kref_init(&priv->ref); | 1301 | kref_init(&priv->ref); |
1302 | mutex_init(&priv->mutex); | 1302 | mutex_init(&priv->mutex); |
@@ -1400,7 +1400,7 @@ out_return: | |||
1400 | 1400 | ||
1401 | static int data_of_remove(struct platform_device *op) | 1401 | static int data_of_remove(struct platform_device *op) |
1402 | { | 1402 | { |
1403 | struct fpga_device *priv = dev_get_drvdata(&op->dev); | 1403 | struct fpga_device *priv = platform_get_drvdata(op); |
1404 | struct device *this_device = priv->miscdev.this_device; | 1404 | struct device *this_device = priv->miscdev.this_device; |
1405 | 1405 | ||
1406 | /* remove all sysfs files, now the device cannot be re-enabled */ | 1406 | /* remove all sysfs files, now the device cannot be re-enabled */ |