aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/applesmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/applesmc.c')
-rw-r--r--drivers/hwmon/applesmc.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index eb81a6430fe4..571f49e80277 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -79,11 +79,15 @@
79 79
80/* 80/*
81 * Temperature sensors keys (sp78 - 2 bytes). 81 * Temperature sensors keys (sp78 - 2 bytes).
82 * First set for Macbook(Pro), second for Macmini.
83 */ 82 */
84static const char* temperature_sensors_sets[][13] = { 83static const char* temperature_sensors_sets[][13] = {
84/* Set 0: Macbook Pro */
85 { "TA0P", "TB0T", "TC0D", "TC0P", "TG0H", "TG0P", "TG0T", "Th0H", 85 { "TA0P", "TB0T", "TC0D", "TC0P", "TG0H", "TG0P", "TG0T", "Th0H",
86 "Th1H", "Tm0P", "Ts0P", "Ts1P", NULL }, 86 "Th1H", "Tm0P", "Ts0P", "Ts1P", NULL },
87/* Set 1: Macbook set */
88 { "TB0T", "TC0D", "TC0P", "TM0P", "TN0P", "TN1P", "Th0H", "Th0S",
89 "Th1H", "Ts0P", NULL },
90/* Set 2: Macmini set */
87 { "TC0D", "TC0P", NULL } 91 { "TC0D", "TC0P", NULL }
88}; 92};
89 93
@@ -1048,7 +1052,7 @@ static const struct attribute_group temperature_attributes_group =
1048/* 1052/*
1049 * applesmc_dmi_match - found a match. return one, short-circuiting the hunt. 1053 * applesmc_dmi_match - found a match. return one, short-circuiting the hunt.
1050 */ 1054 */
1051static int applesmc_dmi_match(struct dmi_system_id *id) 1055static int applesmc_dmi_match(const struct dmi_system_id *id)
1052{ 1056{
1053 int i = 0; 1057 int i = 0;
1054 struct dmi_match_data* dmi_data = id->driver_data; 1058 struct dmi_match_data* dmi_data = id->driver_data;
@@ -1129,10 +1133,10 @@ static void applesmc_release_accelerometer(void)
1129static __initdata struct dmi_match_data applesmc_dmi_data[] = { 1133static __initdata struct dmi_match_data applesmc_dmi_data[] = {
1130/* MacBook Pro: accelerometer, backlight and temperature set 0 */ 1134/* MacBook Pro: accelerometer, backlight and temperature set 0 */
1131 { .accelerometer = 1, .light = 1, .temperature_set = 0 }, 1135 { .accelerometer = 1, .light = 1, .temperature_set = 0 },
1132/* MacBook: accelerometer and temperature set 0 */ 1136/* MacBook: accelerometer and temperature set 1 */
1133 { .accelerometer = 1, .light = 0, .temperature_set = 0 }, 1137 { .accelerometer = 1, .light = 0, .temperature_set = 1 },
1134/* MacBook: temperature set 1 */ 1138/* MacMini: temperature set 2 */
1135 { .accelerometer = 0, .light = 0, .temperature_set = 1 } 1139 { .accelerometer = 0, .light = 0, .temperature_set = 2 },
1136}; 1140};
1137 1141
1138/* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1". 1142/* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".