diff options
author | Guenter Roeck | 2013-04-02 08:53:19 -0700 |
---|---|---|
committer | Guenter Roeck | 2013-04-07 21:16:42 -0700 |
commit | 2c7fd30da21bf6bda12d7a0f678e4fd8ed362c96 (patch) | |
tree | 466504e48c8d28fee78f5515dbdd5a6b199a650d /drivers/hwmon/nct6775.c | |
parent | c81cc5a4c14d8d7cc5c891ddf6cb8e7750a44dee (diff) |
hwmon: (nct6775) Expand scope of supported chips
NCT6775, NCT6776, and NCT6779 have a number of variants with the same
chip ID but different chip labels. Add text "or compatible" to the
message displayed when the driver is loaded and rephrase the Kconfig
entry to reflect that it also supports compatible chips.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/nct6775.c')
-rw-r--r-- | drivers/hwmon/nct6775.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c index 2269bb241b83..d05a700b7daf 100644 --- a/drivers/hwmon/nct6775.c +++ b/drivers/hwmon/nct6775.c @@ -4072,16 +4072,17 @@ static struct platform_driver nct6775_driver = { .remove = nct6775_remove, }; +static const char *nct6775_sio_names[] __initconst = { + "NCT6775F", + "NCT6776D/F", + "NCT6779D", +}; + /* nct6775_find() looks for a '627 in the Super-I/O config space */ static int __init nct6775_find(int sioaddr, unsigned short *addr, struct nct6775_sio_data *sio_data) { - static const char sio_name_NCT6775[] __initconst = "NCT6775F"; - static const char sio_name_NCT6776[] __initconst = "NCT6776F"; - static const char sio_name_NCT6779[] __initconst = "NCT6779D"; - u16 val; - const char *sio_name; int err; err = superio_enter(sioaddr); @@ -4096,15 +4097,12 @@ static int __init nct6775_find(int sioaddr, unsigned short *addr, switch (val & SIO_ID_MASK) { case SIO_NCT6775_ID: sio_data->kind = nct6775; - sio_name = sio_name_NCT6775; break; case SIO_NCT6776_ID: sio_data->kind = nct6776; - sio_name = sio_name_NCT6776; break; case SIO_NCT6779_ID: sio_data->kind = nct6779; - sio_name = sio_name_NCT6779; break; default: if (val != 0xffff) @@ -4132,7 +4130,8 @@ static int __init nct6775_find(int sioaddr, unsigned short *addr, } superio_exit(sioaddr); - pr_info("Found %s chip at %#x\n", sio_name, *addr); + pr_info("Found %s or compatible chip at %#x\n", + nct6775_sio_names[sio_data->kind], *addr); sio_data->sioreg = sioaddr; return 0; |