aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/ams/ams-core.c4
-rw-r--r--drivers/hwmon/ams/ams-i2c.c4
-rw-r--r--drivers/hwmon/ams/ams-pmu.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hwmon/ams/ams-core.c b/drivers/hwmon/ams/ams-core.c
index f1f0f5d0442c..f5ebad561412 100644
--- a/drivers/hwmon/ams/ams-core.c
+++ b/drivers/hwmon/ams/ams-core.c
@@ -141,10 +141,10 @@ static void ams_worker(struct work_struct *work)
141int ams_sensor_attach(void) 141int ams_sensor_attach(void)
142{ 142{
143 int result; 143 int result;
144 u32 *prop; 144 const u32 *prop;
145 145
146 /* Get orientation */ 146 /* Get orientation */
147 prop = (u32*)get_property(ams_info.of_node, "orientation", NULL); 147 prop = get_property(ams_info.of_node, "orientation", NULL);
148 if (!prop) 148 if (!prop)
149 return -ENODEV; 149 return -ENODEV;
150 ams_info.orient1 = *prop; 150 ams_info.orient1 = *prop;
diff --git a/drivers/hwmon/ams/ams-i2c.c b/drivers/hwmon/ams/ams-i2c.c
index 0d24bdfea53e..485d333bcb3e 100644
--- a/drivers/hwmon/ams/ams-i2c.c
+++ b/drivers/hwmon/ams/ams-i2c.c
@@ -263,7 +263,7 @@ int __init ams_i2c_init(struct device_node *np)
263{ 263{
264 char *tmp_bus; 264 char *tmp_bus;
265 int result; 265 int result;
266 u32 *prop; 266 const u32 *prop;
267 267
268 mutex_lock(&ams_info.lock); 268 mutex_lock(&ams_info.lock);
269 269
@@ -276,7 +276,7 @@ int __init ams_i2c_init(struct device_node *np)
276 ams_info.bustype = BUS_I2C; 276 ams_info.bustype = BUS_I2C;
277 277
278 /* look for bus either using "reg" or by path */ 278 /* look for bus either using "reg" or by path */
279 prop = (u32*)get_property(ams_info.of_node, "reg", NULL); 279 prop = get_property(ams_info.of_node, "reg", NULL);
280 if (!prop) { 280 if (!prop) {
281 result = -ENODEV; 281 result = -ENODEV;
282 282
diff --git a/drivers/hwmon/ams/ams-pmu.c b/drivers/hwmon/ams/ams-pmu.c
index 4636ae031a53..1b01c215bfe7 100644
--- a/drivers/hwmon/ams/ams-pmu.c
+++ b/drivers/hwmon/ams/ams-pmu.c
@@ -146,7 +146,7 @@ static void ams_pmu_exit(void)
146 146
147int __init ams_pmu_init(struct device_node *np) 147int __init ams_pmu_init(struct device_node *np)
148{ 148{
149 u32 *prop; 149 const u32 *prop;
150 int result; 150 int result;
151 151
152 mutex_lock(&ams_info.lock); 152 mutex_lock(&ams_info.lock);
@@ -160,7 +160,7 @@ int __init ams_pmu_init(struct device_node *np)
160 ams_info.bustype = BUS_HOST; 160 ams_info.bustype = BUS_HOST;
161 161
162 /* Get PMU command, should be 0x4e, but we can never know */ 162 /* Get PMU command, should be 0x4e, but we can never know */
163 prop = (u32*)get_property(ams_info.of_node, "reg", NULL); 163 prop = get_property(ams_info.of_node, "reg", NULL);
164 if (!prop) { 164 if (!prop) {
165 result = -ENODEV; 165 result = -ENODEV;
166 goto exit; 166 goto exit;