I2C: use chip driver name to request regions
PATCH 1/1 I2C: use chip driver name to request regions
Hi Domen,
Quoted 2 lines
Trivial patch against 2.6.10-rc3-bk2.
Whenrequest_regionis called name is set to "", use module name.
Correct. I even think we should do the same for other chip drivers. For now they all use an arbitrary string. Using the driver's name would be both more consistent and more efficient (spares some bytes of memory).
Greg, how does it look?
(Note that my patch does NOT include Domen's one, which would have to be applied separately.)
Thanks.
drivers/i2c/chips/lm78.c renamed from drivers/i2c/chips.orig/lm78.c +1 -1
@@ -462,7 +462,7 @@/* Reserve the ISA region */ if (is_isa) -if (!request_region (address,LM78_EXTENT ,"lm78" )) { +if (!request_region (address,LM78_EXTENT , lm78_driver.name)) { err = -EBUSY ; goto ERROR0; }
drivers/i2c/chips/pc87360.c renamed from drivers/i2c/chips.orig/pc87360.c +2 -1
@@ -756,7 +756,8 @@for (i =0 ; i <3 ; i++) {if (((data->address[i] = extra_isa[i])) - && !request_region (extra_isa[i],PC87360_EXTENT ,"pc87360" )) { + && !request_region (extra_isa[i],PC87360_EXTENT , + pc87360_driver.name)) {dev_err (&new_client->dev,"Region 0x%x-0x%x already " "in use!\n" , extra_isa[i], extra_isa[i]+PC87360_EXTENT -1 );
drivers/i2c/chips/smsc47m1.c renamed from drivers/i2c/chips.orig/smsc47m1.c +1 -1
@@ -400,7 +400,7 @@return 0 ; } -if (!request_region (address,SMSC_EXTENT ,"smsc47m1" )) { +if (!request_region (address,SMSC_EXTENT , smsc47m1_driver.name)) {dev_err (&adapter->dev,"Region 0x%x already in use!\n" , address);return -EBUSY ; }
drivers/i2c/chips/via686a.c renamed from drivers/i2c/chips.orig/via686a.c +1 -1
@@ -613,7 +613,7 @@ }/* Reserve the ISA region */ -if (!request_region (address,VIA686A_EXTENT ,"via686a-sensor" )) { +if (!request_region (address,VIA686A_EXTENT , via686a_driver.name)) {dev_err (&adapter->dev,"region 0x%x already in use!\n" , address);return -ENODEV ;
drivers/i2c/chips/w83627hf.c renamed from drivers/i2c/chips.orig/w83627hf.c +1 -1
@@ -984,7 +984,7 @@if (force_addr) address = force_addr & ~(WINB_EXTENT -1 ); -if (!request_region (address,WINB_EXTENT ,"w83627hf" )) { +if (!request_region (address,WINB_EXTENT , w83627hf_driver.name)) { err = -EBUSY ; goto ERROR0; }
drivers/i2c/chips/w83781d.c renamed from drivers/i2c/chips.orig/w83781d.c +2 -1
@@ -1065,7 +1065,8 @@ }if (is_isa) -if (!request_region (address,W83781D_EXTENT ,"w83781d" )) { +if (!request_region (address,W83781D_EXTENT , + w83781d_driver.name)) {dev_dbg (&adapter->dev,"Request of region " "0x%x-0x%x for w83781d failed\n" , address, address +W83781D_EXTENT -1 );
Signature · 2 lines
Jean Delvare http://khali.linux-fr.org/
Greg KH
AppliedPATCH 1/1 I2C: use chip driver name to request regions
Quoted 10 lines · Jean Delvare
Hi Domen,
Quoted 2 lines
Trivial patch against 2.6.10-rc3-bk2.
Whenrequest_regionis called name is set to "", use module name.Correct. I even think we should do the same for other chip drivers. For now they all use an arbitrary string. Using the driver's name would be both more consistent and more efficient (spares some bytes of memory).
Greg, how does it look?
Applied, thanks.
Quoted 2 lines
(Note that my patch does NOT include Domen's one, which would have to be applied separately.)
If he sent it to me, it would be :)
thanks,
greg k-h