Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180320
b: refs/heads/master
c: 197027e
h: refs/heads/master
v: v3
  • Loading branch information
Jean Delvare committed Feb 5, 2010
1 parent d280d08 commit 62cd25c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 85f8d3e5faea8bd36c3e5196f8334f7db45e19b2
refs/heads/master: 197027e6ef830d60e10f76efc8d12bf3b6c35db5
25 changes: 12 additions & 13 deletions trunk/drivers/hwmon/lm78.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,17 +851,16 @@ static struct lm78_data *lm78_update_device(struct device *dev)
static int __init lm78_isa_found(unsigned short address)
{
int val, save, found = 0;

/* We have to request the region in two parts because some
boards declare base+4 to base+7 as a PNP device */
if (!request_region(address, 4, "lm78")) {
pr_debug("lm78: Failed to request low part of region\n");
return 0;
}
if (!request_region(address + 4, 4, "lm78")) {
pr_debug("lm78: Failed to request high part of region\n");
release_region(address, 4);
return 0;
int port;

/* Some boards declare base+0 to base+7 as a PNP device, some base+4
* to base+7 and some base+5 to base+6. So we better request each port
* individually for the probing phase. */
for (port = address; port < address + LM78_EXTENT; port++) {
if (!request_region(port, 1, "lm78")) {
pr_debug("lm78: Failed to request port 0x%x\n", port);
goto release;
}
}

#define REALLY_SLOW_IO
Expand Down Expand Up @@ -925,8 +924,8 @@ static int __init lm78_isa_found(unsigned short address)
val & 0x80 ? "LM79" : "LM78", (int)address);

release:
release_region(address + 4, 4);
release_region(address, 4);
for (port--; port >= address; port--)
release_region(port, 1);
return found;
}

Expand Down

0 comments on commit 62cd25c

Please sign in to comment.