diff options
Diffstat (limited to 'drivers/hwmon/max197.c')
| -rw-r--r-- | drivers/hwmon/max197.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/hwmon/max197.c b/drivers/hwmon/max197.c index 6304f2616fa..82128ad79a9 100644 --- a/drivers/hwmon/max197.c +++ b/drivers/hwmon/max197.c @@ -257,11 +257,11 @@ static const struct attribute_group max197_sysfs_group = { }, }; -static int __devinit max197_probe(struct platform_device *pdev) +static int max197_probe(struct platform_device *pdev) { int ch, ret; struct max197_data *data; - struct max197_platform_data *pdata = pdev->dev.platform_data; + struct max197_platform_data *pdata = dev_get_platdata(&pdev->dev); enum max197_chips chip = platform_get_device_id(pdev)->driver_data; if (pdata == NULL) { @@ -275,10 +275,8 @@ static int __devinit max197_probe(struct platform_device *pdev) } data = devm_kzalloc(&pdev->dev, sizeof(struct max197_data), GFP_KERNEL); - if (!data) { - dev_err(&pdev->dev, "devm_kzalloc failed\n"); + if (!data) return -ENOMEM; - } data->pdata = pdata; mutex_init(&data->lock); @@ -316,7 +314,7 @@ error: return ret; } -static int __devexit max197_remove(struct platform_device *pdev) +static int max197_remove(struct platform_device *pdev) { struct max197_data *data = platform_get_drvdata(pdev); @@ -339,7 +337,7 @@ static struct platform_driver max197_driver = { .owner = THIS_MODULE, }, .probe = max197_probe, - .remove = __devexit_p(max197_remove), + .remove = max197_remove, .id_table = max197_device_ids, }; module_platform_driver(max197_driver); |
