Commit ed6579b1 authored by Jean Delvare's avatar Jean Delvare Committed by Greg Kroah-Hartman

[PATCH] I2C: use chip driver name to request regions

> Trivial patch against 2.6.10-rc3-bk2.
> When request_region is 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).
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 6237b3b3
......@@ -462,7 +462,7 @@ int lm78_detect(struct i2c_adapter *adapter, int address, int kind)
/* 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;
}
......
......@@ -756,7 +756,8 @@ int pc87360_detect(struct i2c_adapter *adapter, int address, int kind)
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);
......
......@@ -400,7 +400,7 @@ static int smsc47m1_detect(struct i2c_adapter *adapter, int address, int kind)
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;
}
......
......@@ -613,7 +613,7 @@ static int via686a_detect(struct i2c_adapter *adapter, int address, int kind)
}
/* 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;
......
......@@ -984,7 +984,7 @@ int w83627hf_detect(struct i2c_adapter *adapter, int address,
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;
}
......
......@@ -1065,7 +1065,8 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind)
}
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment