Skip to contentSkip to conversation

hp_accel: Fix driver name

PATCH In review Jean Delvare 2 participants 4 messages Feb 19, 2011 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 hp_accel: Fix driver name

I suspect that the "lis3lv02d" driver name is a legacy from before the split into several modules. Use a specific name for the hp_accel driver, for better error messages and easier investigation of issues.

Cc Eric Piel <[email protected]>
Cc Guenter Roeck <[email protected]>

---
Not tested due to lack of hardware.

 drivers/platform/x86/hp_accel.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/hp_accel.c +1 -1
@@ -39,7 +39,7 @@
 #include <acpi/acpi_drivers.h>
 #include "../../misc/lis3lv02d/lis3lv02d.h"
 
-#define DRIVER_NAME     "lis3lv02d"
+#define DRIVER_NAME     "hp_accel"
 #define ACPI_MDPS_CLASS "accelerometer"
 
 /* Delayed LEDs infrastructure ------------------------------------ */
Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#1 lore raw
Quoted 16 lines · Jean Delvare

I suspect that the "lis3lv02d" driver name is a legacy from before the split into several modules. Use a specific name for the hp_accel driver, for better error messages and easier investigation of issues.

Cc Eric Piel <[email protected]>
Cc Guenter Roeck <[email protected]>

---
Not tested due to lack of hardware.

 drivers/platform/x86/hp_accel.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

drivers/platform/x86/hp_accel.c line 44

Quoted 7 lines
drivers/platform/x86/hp_accel.c +1 -1
@@ -39,7 +39,7 @@
 #include <acpi/acpi_drivers.h>
 #include "../../misc/lis3lv02d/lis3lv02d.h"
 
-#define DRIVER_NAME     "lis3lv02d"
+#define DRIVER_NAME     "hp_accel"
 #define ACPI_MDPS_CLASS "accelerometer"
 

Not sure if you can do that, given the close interrelation with lis3lv02d.c. That really asks for testing on a real system.

Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#2 lore raw
In reply to Jean Delvare

Hi Guenter,

Quoted 20 lines · Guenter Roeck
Quoted 19 lines · Jean Delvare

I suspect that the "lis3lv02d" driver name is a legacy from before the split into several modules. Use a specific name for the hp_accel driver, for better error messages and easier investigation of issues.

Cc Eric Piel <[email protected]>
Cc Guenter Roeck <[email protected]>

---
Not tested due to lack of hardware.

 drivers/platform/x86/hp_accel.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/hp_accel.c +0 -0
@@ -39,7 +39,7 @@
 #include <acpi/acpi_drivers.h>
 #include "../../misc/lis3lv02d/lis3lv02d.h"
 
Quoted 5 lines

drivers/platform/x86/hp_accel.c line 43

Quoted 3 lines
drivers/platform/x86/hp_accel.c +1 -1
-#define DRIVER_NAME     "lis3lv02d"
+#define DRIVER_NAME     "hp_accel"
 #define ACPI_MDPS_CLASS "accelerometer"

Not sure if you can do that, given the close interrelation with lis3lv02d.c.

I was a little worried about this at first, but then noticed that the string is (almost) only used as the name of the acpi driver and device. The lis3lv02d core driver doesn't deal with ACPI at all, so it shouldn't make a difference. Also, the lis3lv02d_i2c and lis3lv02d_spi drivers do have different driver name strings, which implies that there is no requirement for a common driver name string.

Quoted 1 line

That really asks for testing on a real system.

I agree still. The only problem I can think of is if user-space expects a specific ACPI driver and/or device name. Note that, in the event this one patch causes trouble, I'll simply drop it. I noticed what I think is an improper driver name while working on the driver, but what I really care about is moving these drivers out of drivers/hwmon, i.e. the first 3 patches of the set.

Thanks,

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Acked-by on v1 4/4
#3 lore raw
In reply to Jean Delvare

On Sat, Feb 19, 2011 at 03:11:14PM -0500, Jean Delvare wrote:
[ ... ]

Quoted 10 lines
Quoted 2 lines

Not sure if you can do that, given the close interrelation with lis3lv02d.c.

I was a little worried about this at first, but then noticed that the string is (almost) only used as the name of the acpi driver and device. The lis3lv02d core driver doesn't deal with ACPI at all, so it shouldn't make a difference. Also, the lis3lv02d_i2c and lis3lv02d_spi drivers do have different driver name strings, which implies that there is no requirement for a common driver name string.

Quoted 9 lines
Quoted 1 line

That really asks for testing on a real system.

I agree still. The only problem I can think of is if user-space expects a specific ACPI driver and/or device name. Note that, in the event this one patch causes trouble, I'll simply drop it. I noticed what I think is an improper driver name while working on the driver, but what I really care about is moving these drivers out of drivers/hwmon, i.e. the first 3 patches of the set.

Makes sense.

Still,

Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors