Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191612
b: refs/heads/master
c: 0ded754
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed Apr 13, 2010
1 parent d2adef5 commit c29da48
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 050d4cc7029b73997d6821d89487b1f777d4873c
refs/heads/master: 0ded75428605213641897d6b8d8e9cf9fdb6eb8d
16 changes: 16 additions & 0 deletions trunk/drivers/sh/intc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,18 @@ int __init register_intc_controller(struct intc_desc *desc)
return -ENOMEM;
}

static ssize_t
show_intc_name(struct sys_device *dev, struct sysdev_attribute *attr, char *buf)
{
struct intc_desc_int *d;

d = container_of(dev, struct intc_desc_int, sysdev);

return sprintf(buf, "%s\n", d->chip.name);
}

static SYSDEV_ATTR(name, S_IRUGO, show_intc_name, NULL);

static int intc_suspend(struct sys_device *dev, pm_message_t state)
{
struct intc_desc_int *d;
Expand Down Expand Up @@ -1098,8 +1110,12 @@ static int __init register_intc_sysdevs(void)
d->sysdev.id = id;
d->sysdev.cls = &intc_sysdev_class;
error = sysdev_register(&d->sysdev);
if (error == 0)
error = sysdev_create_file(&d->sysdev,
&attr_name);
if (error)
break;

id++;
}
}
Expand Down

0 comments on commit c29da48

Please sign in to comment.