drm/amdgpu/dce8: disable hpd on local panels
[firefly-linux-kernel-4.4.55.git] / drivers / hwmon / iio_hwmon.c
index 980175628563a0987531a05afda3312bb20b7511..d5c06f2764f4c89d06607fa74980716c3c1d39a3 100644 (file)
@@ -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;
@@ -177,7 +177,6 @@ MODULE_DEVICE_TABLE(of, iio_hwmon_of_match);
 static struct platform_driver __refdata iio_hwmon_driver = {
        .driver = {
                .name = "iio_hwmon",
-               .owner = THIS_MODULE,
                .of_match_table = iio_hwmon_of_match,
        },
        .probe = iio_hwmon_probe,