Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109935
b: refs/heads/master
c: cec5eb7
h: refs/heads/master
i:
  109933: 7b9436f
  109931: e2818b5
  109927: 4cd2bd1
  109919: 661e580
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Sep 22, 2008
1 parent eac564c commit 86a315c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 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: ae9111912500db9fcc244ec16c3d7e471c551f52
refs/heads/master: cec5eb7be3a104fffd27ca967ee8e15a123050e2
23 changes: 14 additions & 9 deletions trunk/drivers/pcmcia/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,18 @@ static int pcmcia_device_probe(struct device * dev)
p_drv = to_pcmcia_drv(dev->driver);
s = p_dev->socket;

/* The PCMCIA code passes the match data in via dev->driver_data
* which is an ugly hack. Once the driver probe is called it may
* and often will overwrite the match data so we must save it first
*
* handle pseudo multifunction devices:
* there are at most two pseudo multifunction devices.
* if we're matching against the first, schedule a
* call which will then check whether there are two
* pseudo devices, and if not, add the second one.
*/
did = p_dev->dev.driver_data;

ds_dbg(1, "trying to bind %s to %s\n", p_dev->dev.bus_id,
p_drv->drv.name);

Expand Down Expand Up @@ -455,21 +467,14 @@ static int pcmcia_device_probe(struct device * dev)
goto put_module;
}

/* handle pseudo multifunction devices:
* there are at most two pseudo multifunction devices.
* if we're matching against the first, schedule a
* call which will then check whether there are two
* pseudo devices, and if not, add the second one.
*/
did = p_dev->dev.driver_data;
if (did && (did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) &&
(p_dev->socket->device_count == 1) && (p_dev->device_no == 0))
pcmcia_add_device_later(p_dev->socket, 0);

put_module:
put_module:
if (ret)
module_put(p_drv->owner);
put_dev:
put_dev:
if (ret)
put_device(dev);
return (ret);
Expand Down

0 comments on commit 86a315c

Please sign in to comment.