Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[sfrench/cifs-2.6.git] / drivers / hwmon / w83781d.c
index fc12bd412e3a4917b5645339d3dd388af8f0d3a3..0bdab959b7369335672f7cd09b01386a15054472 100644 (file)
@@ -58,7 +58,10 @@ static const unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
                                                0x2e, 0x2f, I2C_CLIENT_END };
 /* Insmod parameters */
 I2C_CLIENT_INSMOD_4(w83781d, w83782d, w83783s, as99127f);
-I2C_CLIENT_MODULE_PARM(force_subclients, "List of subclient addresses: "
+
+static unsigned short force_subclients[4];
+module_param_array(force_subclients, short, NULL, 0);
+MODULE_PARM_DESC(force_subclients, "List of subclient addresses: "
                    "{bus, clientaddr, subclientaddr1, subclientaddr2}");
 
 static int reset;
@@ -1459,7 +1462,8 @@ static struct w83781d_data *w83781d_update_device(struct device *dev)
                                data->pwm[i] =
                                    w83781d_read_value(data,
                                                       W83781D_REG_PWM[i]);
-                               if ((data->type != w83782d || !client->driver)
+                               /* Only W83782D on SMBus has PWM3 and PWM4 */
+                               if ((data->type != w83782d || !client)
                                    && i == 1)
                                        break;
                        }