Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Jean Delvare and committed by
Greg Kroah-Hartman
27fe048e e647ecf1

+5 -13
+1 -6
Documentation/hwmon/lm78
··· 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/
+4 -7
drivers/hwmon/lm78.c
··· 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 ··· 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 { ··· 577 578 578 579 if (kind == lm78) { 579 580 client_name = "lm78"; 580 - } else if (kind == lm78j) { 581 - client_name = "lm78-j"; 582 581 } else if (kind == lm79) { 583 582 client_name = "lm79"; 584 583 } ··· 785 788 786 789 787 790 MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>"); 788 - MODULE_DESCRIPTION("LM78, LM78-J and LM79 driver"); 791 + MODULE_DESCRIPTION("LM78/LM79 driver"); 789 792 MODULE_LICENSE("GPL"); 790 793 791 794 module_init(sm_lm78_init);