Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3750
b: refs/heads/master
c: a5b5577
h: refs/heads/master
v: v3
  • Loading branch information
Dominik Brodowski authored and Linus Torvalds committed Jun 28, 2005
1 parent 7536ccb commit ff42e29
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 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: f602ff7eb4e44e7245bfeeba4d078144703fcd76
refs/heads/master: a5b5577898d9330a78dea1c9e75da1540c36bf72
20 changes: 19 additions & 1 deletion trunk/drivers/pcmcia/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ static inline void pcmcia_add_pseudo_device(struct pcmcia_bus_socket *s)
static void pcmcia_bus_rescan(void)
{
/* must be called with skt_sem held */
bus_rescan_devices(&pcmcia_bus_type);
bus_rescan_devices(&pcmcia_bus_type);
}

static inline int pcmcia_devmatch(struct pcmcia_device *dev,
Expand Down Expand Up @@ -869,6 +869,23 @@ pcmcia_device_stringattr(prod_id2, prod_id[1]);
pcmcia_device_stringattr(prod_id3, prod_id[2]);
pcmcia_device_stringattr(prod_id4, prod_id[3]);


static ssize_t pcmcia_store_allow_func_id_match (struct device * dev, struct device_attribute *attr,
const char * buf, size_t count)
{
struct pcmcia_device *p_dev = to_pcmcia_dev(dev);
if (!count)
return -EINVAL;

down(&p_dev->socket->skt_sem);
p_dev->allow_func_id_match = 1;
up(&p_dev->socket->skt_sem);

bus_rescan_devices(&pcmcia_bus_type);

return count;
}

static struct device_attribute pcmcia_dev_attrs[] = {
__ATTR(function, 0444, func_show, NULL),
__ATTR_RO(func_id),
Expand All @@ -878,6 +895,7 @@ static struct device_attribute pcmcia_dev_attrs[] = {
__ATTR_RO(prod_id2),
__ATTR_RO(prod_id3),
__ATTR_RO(prod_id4),
__ATTR(allow_func_id_match, 0200, NULL, pcmcia_store_allow_func_id_match),
__ATTR_NULL,
};

Expand Down

0 comments on commit ff42e29

Please sign in to comment.