summaryrefslogtreecommitdiff
path: root/drivers/misc/carma/carma-fpga.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/carma/carma-fpga.c')
-rw-r--r--drivers/misc/carma/carma-fpga.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/misc/carma/carma-fpga.c b/drivers/misc/carma/carma-fpga.c
index 7508cafff103..7b56563f8b74 100644
--- a/drivers/misc/carma/carma-fpga.c
+++ b/drivers/misc/carma/carma-fpga.c
@@ -1002,10 +1002,10 @@ static ssize_t data_en_set(struct device *dev, struct device_attribute *attr,
unsigned long enable;
int ret;
- ret = strict_strtoul(buf, 0, &enable);
+ ret = kstrtoul(buf, 0, &enable);
if (ret) {
dev_err(priv->dev, "unable to parse enable input\n");
- return -EINVAL;
+ return ret;
}
/* protect against concurrent enable/disable */
@@ -1296,7 +1296,7 @@ static int data_of_probe(struct platform_device *op)
goto out_return;
}
- dev_set_drvdata(&op->dev, priv);
+ platform_set_drvdata(op, priv);
priv->dev = &op->dev;
kref_init(&priv->ref);
mutex_init(&priv->mutex);
@@ -1400,7 +1400,7 @@ out_return:
static int data_of_remove(struct platform_device *op)
{
- struct fpga_device *priv = dev_get_drvdata(&op->dev);
+ struct fpga_device *priv = platform_get_drvdata(op);
struct device *this_device = priv->miscdev.this_device;
/* remove all sysfs files, now the device cannot be re-enabled */