[PATCH] [3/4] PMC-related cleanups
Greg KH
gregkh at suse.de
Sat Jan 27 09:32:04 EST 2007
On Thu, Jan 25, 2007 at 02:20:02AM -0600, Olof Johansson wrote:
> Introduce _SYSDEV_ATTR(), to be used to just define the struct, and not a
> named variable with the attribute. Useful for arrays of sysdev_attributes.
>
> Signed-off-by: Olof Johansson <olof at lixom.net>
>
>
> Index: powerpc/include/linux/sysdev.h
> ===================================================================
> --- powerpc.orig/include/linux/sysdev.h
> +++ powerpc/include/linux/sysdev.h
> @@ -98,12 +98,15 @@ struct sysdev_attribute {
> };
>
>
> -#define SYSDEV_ATTR(_name,_mode,_show,_store) \
> -struct sysdev_attribute attr_##_name = { \
> +#define _SYSDEV_ATTR(_name,_mode,_show,_store) \
> +{ \
> .attr = {.name = __stringify(_name), .mode = _mode }, \
> .show = _show, \
> .store = _store, \
> -};
> +}
Oops, you need to add '.owner' to that attribute structure. In all
fairness, it's a bug, not caused by anything that you did.
If you add that, feel free to add my:
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
to the patch and send it through Paul.
thanks,
greg k-h
More information about the Linuxppc-dev
mailing list