summaryrefslogtreecommitdiffstats
path: root/drivers/aiodev
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/aiodev')
-rw-r--r--drivers/aiodev/core.c4
-rw-r--r--drivers/aiodev/imx_thermal.c1
-rw-r--r--drivers/aiodev/qoriq_thermal.c1
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/aiodev/core.c b/drivers/aiodev/core.c
index 79f935d710..b5d06da932 100644
--- a/drivers/aiodev/core.c
+++ b/drivers/aiodev/core.c
@@ -106,8 +106,6 @@ int aiodevice_register(struct aiodevice *aiodev)
aiodev->dev.id = DEVICE_ID_SINGLE;
aiodev->name = of_alias_get(aiodev->hwdev->device_node);
- if (!aiodev->name)
- aiodev->name = aiodev->hwdev->device_node->name;
}
if (!aiodev->name) {
@@ -115,7 +113,7 @@ int aiodevice_register(struct aiodevice *aiodev)
aiodev->dev.id = DEVICE_ID_DYNAMIC;
}
- strcpy(aiodev->dev.name, aiodev->name);
+ dev_set_name(&aiodev->dev, aiodev->name);
aiodev->dev.parent = aiodev->hwdev;
diff --git a/drivers/aiodev/imx_thermal.c b/drivers/aiodev/imx_thermal.c
index c020a1091d..9e50708355 100644
--- a/drivers/aiodev/imx_thermal.c
+++ b/drivers/aiodev/imx_thermal.c
@@ -177,6 +177,7 @@ static int imx_thermal_probe(struct device_d *dev)
imx_thermal->aiodev.num_channels = 1;
imx_thermal->aiodev.hwdev = dev;
+ imx_thermal->aiodev.name = "thermal-sensor";
imx_thermal->aiodev.channels =
xmalloc(imx_thermal->aiodev.num_channels *
sizeof(imx_thermal->aiodev.channels[0]));
diff --git a/drivers/aiodev/qoriq_thermal.c b/drivers/aiodev/qoriq_thermal.c
index d29da02a68..7556fef025 100644
--- a/drivers/aiodev/qoriq_thermal.c
+++ b/drivers/aiodev/qoriq_thermal.c
@@ -232,6 +232,7 @@ static int qoriq_tmu_probe(struct device_d *dev)
data->aiodev.num_channels = 1;
data->aiodev.hwdev = dev;
+ data->aiodev.name = "thermal-sensor";
data->aiodev.channels = xmalloc(data->aiodev.num_channels *
sizeof(data->aiodev.channels[0]));
data->aiodev.channels[0] = &data->aiochan;