Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: hwmon: (w83781d) Request I/O ports individually for probing hwmon: (lm78) Request I/O ports individually for probing hwmon: (adt7462) Wrong ADT7462_VOLT_COUNT
This commit is contained in:
@@ -179,7 +179,7 @@ static const unsigned short normal_i2c[] = { 0x58, 0x5C, I2C_CLIENT_END };
|
|||||||
*
|
*
|
||||||
* Some, but not all, of these voltages have low/high limits.
|
* Some, but not all, of these voltages have low/high limits.
|
||||||
*/
|
*/
|
||||||
#define ADT7462_VOLT_COUNT 12
|
#define ADT7462_VOLT_COUNT 13
|
||||||
|
|
||||||
#define ADT7462_VENDOR 0x41
|
#define ADT7462_VENDOR 0x41
|
||||||
#define ADT7462_DEVICE 0x62
|
#define ADT7462_DEVICE 0x62
|
||||||
|
@@ -851,17 +851,16 @@ static struct lm78_data *lm78_update_device(struct device *dev)
|
|||||||
static int __init lm78_isa_found(unsigned short address)
|
static int __init lm78_isa_found(unsigned short address)
|
||||||
{
|
{
|
||||||
int val, save, found = 0;
|
int val, save, found = 0;
|
||||||
|
int port;
|
||||||
|
|
||||||
/* We have to request the region in two parts because some
|
/* Some boards declare base+0 to base+7 as a PNP device, some base+4
|
||||||
boards declare base+4 to base+7 as a PNP device */
|
* to base+7 and some base+5 to base+6. So we better request each port
|
||||||
if (!request_region(address, 4, "lm78")) {
|
* individually for the probing phase. */
|
||||||
pr_debug("lm78: Failed to request low part of region\n");
|
for (port = address; port < address + LM78_EXTENT; port++) {
|
||||||
return 0;
|
if (!request_region(port, 1, "lm78")) {
|
||||||
}
|
pr_debug("lm78: Failed to request port 0x%x\n", port);
|
||||||
if (!request_region(address + 4, 4, "lm78")) {
|
goto release;
|
||||||
pr_debug("lm78: Failed to request high part of region\n");
|
}
|
||||||
release_region(address, 4);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define REALLY_SLOW_IO
|
#define REALLY_SLOW_IO
|
||||||
@@ -925,8 +924,8 @@ static int __init lm78_isa_found(unsigned short address)
|
|||||||
val & 0x80 ? "LM79" : "LM78", (int)address);
|
val & 0x80 ? "LM79" : "LM78", (int)address);
|
||||||
|
|
||||||
release:
|
release:
|
||||||
release_region(address + 4, 4);
|
for (port--; port >= address; port--)
|
||||||
release_region(address, 4);
|
release_region(port, 1);
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1793,17 +1793,17 @@ static int __init
|
|||||||
w83781d_isa_found(unsigned short address)
|
w83781d_isa_found(unsigned short address)
|
||||||
{
|
{
|
||||||
int val, save, found = 0;
|
int val, save, found = 0;
|
||||||
|
int port;
|
||||||
|
|
||||||
/* We have to request the region in two parts because some
|
/* Some boards declare base+0 to base+7 as a PNP device, some base+4
|
||||||
boards declare base+4 to base+7 as a PNP device */
|
* to base+7 and some base+5 to base+6. So we better request each port
|
||||||
if (!request_region(address, 4, "w83781d")) {
|
* individually for the probing phase. */
|
||||||
pr_debug("w83781d: Failed to request low part of region\n");
|
for (port = address; port < address + W83781D_EXTENT; port++) {
|
||||||
return 0;
|
if (!request_region(port, 1, "w83781d")) {
|
||||||
}
|
pr_debug("w83781d: Failed to request port 0x%x\n",
|
||||||
if (!request_region(address + 4, 4, "w83781d")) {
|
port);
|
||||||
pr_debug("w83781d: Failed to request high part of region\n");
|
goto release;
|
||||||
release_region(address, 4);
|
}
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define REALLY_SLOW_IO
|
#define REALLY_SLOW_IO
|
||||||
@@ -1877,8 +1877,8 @@ w83781d_isa_found(unsigned short address)
|
|||||||
val == 0x30 ? "W83782D" : "W83781D", (int)address);
|
val == 0x30 ? "W83782D" : "W83781D", (int)address);
|
||||||
|
|
||||||
release:
|
release:
|
||||||
release_region(address + 4, 4);
|
for (port--; port >= address; port--)
|
||||||
release_region(address, 4);
|
release_region(port, 1);
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user