Commit 27fe048eb3787d29bf9cf9d6d12077bb8af869a6

Authored by Jean Delvare
Committed by Greg Kroah-Hartman
1 parent e647ecf15e

[PATCH] hwmon: kill client name lm78-j

Drop the separate client name for the LM78-J chip. This is really
only a later revision of the LM78, with almost no difference and
no difference the driver handles in any case.

This was the only client name that had a dash in it, and special care
had to be taken in libsensors because of it. As we plan to write a new
library soon, I'd like to get rid of this exception before we do.

As a nice side effect, it saves 876 bytes in lm78.ko.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 2 changed files with 5 additions and 13 deletions Side-by-side Diff

Documentation/hwmon/lm78
... ... @@ -2,13 +2,8 @@
2 2 ==================
3 3  
4 4 Supported chips:
5   - * National Semiconductor LM78
  5 + * National Semiconductor LM78 / LM78-J
6 6 Prefix: 'lm78'
7   - Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports)
8   - Datasheet: Publicly available at the National Semiconductor website
9   - http://www.national.com/
10   - * National Semiconductor LM78-J
11   - Prefix: 'lm78-j'
12 7 Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports)
13 8 Datasheet: Publicly available at the National Semiconductor website
14 9 http://www.national.com/
drivers/hwmon/lm78.c
... ... @@ -34,7 +34,7 @@
34 34 static unsigned int normal_isa[] = { 0x0290, I2C_CLIENT_ISA_END };
35 35  
36 36 /* Insmod parameters */
37   -SENSORS_INSMOD_3(lm78, lm78j, lm79);
  37 +SENSORS_INSMOD_2(lm78, lm79);
38 38  
39 39 /* Many LM78 constants specified below */
40 40  
41 41  
... ... @@ -559,10 +559,9 @@
559 559 /* Determine the chip type. */
560 560 if (kind <= 0) {
561 561 i = lm78_read_value(new_client, LM78_REG_CHIPID);
562   - if (i == 0x00 || i == 0x20)
  562 + if (i == 0x00 || i == 0x20 /* LM78 */
  563 + || i == 0x40) /* LM78-J */
563 564 kind = lm78;
564   - else if (i == 0x40)
565   - kind = lm78j;
566 565 else if ((i & 0xfe) == 0xc0)
567 566 kind = lm79;
568 567 else {
... ... @@ -578,8 +577,6 @@
578 577  
579 578 if (kind == lm78) {
580 579 client_name = "lm78";
581   - } else if (kind == lm78j) {
582   - client_name = "lm78-j";
583 580 } else if (kind == lm79) {
584 581 client_name = "lm79";
585 582 }
... ... @@ -788,7 +785,7 @@
788 785  
789 786  
790 787 MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>");
791   -MODULE_DESCRIPTION("LM78, LM78-J and LM79 driver");
  788 +MODULE_DESCRIPTION("LM78/LM79 driver");
792 789 MODULE_LICENSE("GPL");
793 790  
794 791 module_init(sm_lm78_init);