From fca44240009d4cbeb5ea1802774d5be6f4580187 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Tue, 5 Jan 2010 12:48:05 +0100 Subject: [PATCH] --- yaml --- r: 187054 b: refs/heads/master c: 1e395ab3d9b6aa09c5f0aa46a1b0a6fc5bd33133 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/sysdev.h | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 83204d641f50..b2c71b0594d4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3701cde6e35245e26f63252f46c62e8a790fa996 +refs/heads/master: 1e395ab3d9b6aa09c5f0aa46a1b0a6fc5bd33133 diff --git a/trunk/include/linux/sysdev.h b/trunk/include/linux/sysdev.h index b6244f9b533f..1154c29f4101 100644 --- a/trunk/include/linux/sysdev.h +++ b/trunk/include/linux/sysdev.h @@ -123,6 +123,19 @@ struct sysdev_attribute { extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *); extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *); +/* Create/remove NULL terminated attribute list */ +static inline int +sysdev_create_files(struct sys_device *d, struct sysdev_attribute **a) +{ + return sysfs_create_files(&d->kobj, (const struct attribute **)a); +} + +static inline void +sysdev_remove_files(struct sys_device *d, struct sysdev_attribute **a) +{ + return sysfs_remove_files(&d->kobj, (const struct attribute **)a); +} + struct sysdev_ext_attribute { struct sysdev_attribute attr; void *var;