Re: [PATCH] PowerCap: Replace dev_attrs with dev_groups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/25/13 15:14, Srinivas Pandruvada wrote:
> struct class no longer contains dev_attrs field. Replace dev_attrs
> with dev_groups field.
> This caused compile error on latest linux-next tree.
> 
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>

Acked-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>

Thanks.

> ---
>  drivers/powercap/powercap_sys.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c
> index c22fa4c..af07211 100644
> --- a/drivers/powercap/powercap_sys.c
> +++ b/drivers/powercap/powercap_sys.c
> @@ -471,17 +471,18 @@ static ssize_t enabled_store(struct device *dev,
>  
>  	return -ENOSYS;
>  }
> +static DEVICE_ATTR_RW(enabled);
>  
> -static struct device_attribute powercap_def_attrs[] = {
> -		__ATTR(enabled, S_IWUSR | S_IRUGO, enabled_show,
> -							enabled_store),
> -		__ATTR_NULL
> +static struct attribute *powercap_dev_attrs[] = {
> +	&dev_attr_enabled.attr,
> +	NULL
>  };
> +ATTRIBUTE_GROUPS(powercap_dev);
>  
>  static struct class powercap_class = {
>  	.name = "powercap",
>  	.dev_release = powercap_release,
> -	.dev_attrs = powercap_def_attrs,
> +	.dev_groups = powercap_dev_groups,
>  };
>  
>  struct powercap_zone *powercap_register_zone(
> 


-- 
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux