]> git.sur5r.net Git - groeck-nct6775/blobdiff - nct6775.c
Driver should not rely or depend on setting platform_drvdata to NULL
[groeck-nct6775] / nct6775.c
index 7350e24f5052c07eb2810fa454cc3092686a77ab..09c03abd6d01dee82e1238ebaf9ae489b0743017 100644 (file)
--- a/nct6775.c
+++ b/nct6775.c
@@ -35,7 +35,7 @@
  * Chip        #vin    #fan    #pwm    #temp  chip IDs       man ID
  * nct6775f     9      4       3       9      0xb470 0xc1    0x5ca3
  * nct6776f     9      5       3       9      0xc330 0xc1    0x5ca3
- * nct6779d    15      5       5       8      0xc560 0xc1    0x5ca3
+ * nct6779d    15      5       5       7      0xc560 0xc1    0x5ca3
  */
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -493,9 +493,9 @@ struct nct6775_data {
        u8 has_fan_min;         /* some fans don't have min register */
        bool has_fan_div;
        u8 temp_type[3];
-       s16 temp[9];
-       s16 temp_max[9];
-       s16 temp_max_hyst[9];
+       s16 temp[11];
+       s16 temp_max[6];
+       s16 temp_max_hyst[6];
        u32 alarms;
        u8 caseopen;
 
@@ -2943,7 +2943,6 @@ static int __devinit nct6775_probe(struct platform_device *pdev)
 exit_remove:
        nct6775_device_remove_files(dev);
 exit_release:
-       platform_set_drvdata(pdev, NULL);
        release_region(res->start, IOREGION_LENGTH);
 exit:
        return err;
@@ -2956,7 +2955,6 @@ static int __devexit nct6775_remove(struct platform_device *pdev)
        hwmon_device_unregister(data->hwmon_dev);
        nct6775_device_remove_files(&pdev->dev);
        release_region(data->addr, IOREGION_LENGTH);
-       platform_set_drvdata(pdev, NULL);
 
        return 0;
 }