summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/hwmon/iio_hwmon.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/hwmon/iio_hwmon.c')
-rw-r--r--kernel/drivers/hwmon/iio_hwmon.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/kernel/drivers/hwmon/iio_hwmon.c b/kernel/drivers/hwmon/iio_hwmon.c
index 17ae2eb26..d5c06f276 100644
--- a/kernel/drivers/hwmon/iio_hwmon.c
+++ b/kernel/drivers/hwmon/iio_hwmon.c
@@ -109,24 +109,24 @@ static int iio_hwmon_probe(struct platform_device *pdev)
switch (type) {
case IIO_VOLTAGE:
- a->dev_attr.attr.name = kasprintf(GFP_KERNEL,
- "in%d_input",
- in_i++);
+ a->dev_attr.attr.name = devm_kasprintf(dev, GFP_KERNEL,
+ "in%d_input",
+ in_i++);
break;
case IIO_TEMP:
- a->dev_attr.attr.name = kasprintf(GFP_KERNEL,
- "temp%d_input",
- temp_i++);
+ a->dev_attr.attr.name = devm_kasprintf(dev, GFP_KERNEL,
+ "temp%d_input",
+ temp_i++);
break;
case IIO_CURRENT:
- a->dev_attr.attr.name = kasprintf(GFP_KERNEL,
- "curr%d_input",
- curr_i++);
+ a->dev_attr.attr.name = devm_kasprintf(dev, GFP_KERNEL,
+ "curr%d_input",
+ curr_i++);
break;
case IIO_HUMIDITYRELATIVE:
- a->dev_attr.attr.name = kasprintf(GFP_KERNEL,
- "humidity%d_input",
- humidity_i++);
+ a->dev_attr.attr.name = devm_kasprintf(dev, GFP_KERNEL,
+ "humidity%d_input",
+ humidity_i++);
break;
default:
ret = -EINVAL;