]> err.no Git - linux-2.6/blobdiff - drivers/hwmon/hdaps.c
[PATCH] atyfb: Possible cleanups
[linux-2.6] / drivers / hwmon / hdaps.c
index 7841fa070252cd1d637b10085240cfbcc35fac9e..26be4ea8a38ac7c2150d250fdabcc3395f5cbb71 100644 (file)
@@ -41,7 +41,7 @@
 #define HDAPS_PORT_STATE       0x1611  /* device state */
 #define HDAPS_PORT_YPOS                0x1612  /* y-axis position */
 #define        HDAPS_PORT_XPOS         0x1614  /* x-axis position */
-#define HDAPS_PORT_TEMP1       0x1616  /* device temperature, in celcius */
+#define HDAPS_PORT_TEMP1       0x1616  /* device temperature, in Celsius */
 #define HDAPS_PORT_YVAR                0x1617  /* y-axis variance (what is this?) */
 #define HDAPS_PORT_XVAR                0x1619  /* x-axis variance (what is this?) */
 #define HDAPS_PORT_TEMP2       0x161b  /* device temperature (again?) */
@@ -537,6 +537,7 @@ static int __init hdaps_init(void)
                HDAPS_DMI_MATCH_NORMAL("ThinkPad T42"),
                HDAPS_DMI_MATCH_NORMAL("ThinkPad T43"),
                HDAPS_DMI_MATCH_LENOVO("ThinkPad T60p"),
+               HDAPS_DMI_MATCH_LENOVO("ThinkPad T60"),
                HDAPS_DMI_MATCH_NORMAL("ThinkPad X40"),
                HDAPS_DMI_MATCH_NORMAL("ThinkPad X41"),
                HDAPS_DMI_MATCH_LENOVO("ThinkPad X60"),
@@ -587,7 +588,9 @@ static int __init hdaps_init(void)
        input_set_abs_params(hdaps_idev, ABS_Y,
                        -256, 256, HDAPS_INPUT_FUZZ, HDAPS_INPUT_FLAT);
 
-       input_register_device(hdaps_idev);
+       ret = input_register_device(hdaps_idev);
+       if (ret)
+               goto out_idev;
 
        /* start up our timer for the input device */
        init_timer(&hdaps_timer);
@@ -598,6 +601,8 @@ static int __init hdaps_init(void)
        printk(KERN_INFO "hdaps: driver successfully loaded.\n");
        return 0;
 
+out_idev:
+       input_free_device(hdaps_idev);
 out_group:
        sysfs_remove_group(&pdev->dev.kobj, &hdaps_attribute_group);
 out_device: