Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98928
b: refs/heads/master
c: 7d57896
h: refs/heads/master
v: v3
  • Loading branch information
David Brownell authored and Dominik Brodowski committed Jun 24, 2008
1 parent baa82f6 commit 1fac193
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 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: 785e821eb679c171f453722f15c6791de0c1abe1
refs/heads/master: 7d5789616dd3090fe8486fbb849da3e9d9f36bb9
27 changes: 10 additions & 17 deletions trunk/drivers/pcmcia/rsrc_nonstatic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1008,41 +1008,34 @@ static ssize_t store_mem_db(struct device *dev,
}
static DEVICE_ATTR(available_resources_mem, 0600, show_mem_db, store_mem_db);

static struct device_attribute *pccard_rsrc_attributes[] = {
&dev_attr_available_resources_io,
&dev_attr_available_resources_mem,
static struct attribute *pccard_rsrc_attributes[] = {
&dev_attr_available_resources_io.attr,
&dev_attr_available_resources_mem.attr,
NULL,
};

static const struct attribute_group rsrc_attributes = {
.attrs = pccard_rsrc_attributes,
};

static int __devinit pccard_sysfs_add_rsrc(struct device *dev,
struct class_interface *class_intf)
{
struct pcmcia_socket *s = dev_get_drvdata(dev);
struct device_attribute **attr;
int ret = 0;

if (s->resource_ops != &pccard_nonstatic_ops)
return 0;

for (attr = pccard_rsrc_attributes; *attr; attr++) {
ret = device_create_file(dev, *attr);
if (ret)
break;
}

return ret;
return sysfs_create_group(&dev->kobj, &rsrc_attributes);
}

static void __devexit pccard_sysfs_remove_rsrc(struct device *dev,
struct class_interface *class_intf)
{
struct pcmcia_socket *s = dev_get_drvdata(dev);
struct device_attribute **attr;

if (s->resource_ops != &pccard_nonstatic_ops)
return;

for (attr = pccard_rsrc_attributes; *attr; attr++)
device_remove_file(dev, *attr);
sysfs_remove_group(&dev->kobj, &rsrc_attributes);
}

static struct class_interface pccard_rsrc_interface __refdata = {
Expand Down

0 comments on commit 1fac193

Please sign in to comment.