lkml.org 
[lkml]   [2014]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/11] drivers: char: axd: add sysfs setup files
On 10/28/2014 02:12 PM, Greg Kroah-Hartman wrote:
> On Tue, Oct 28, 2014 at 11:26:27AM +0000, Qais Yousef wrote:
>> +/* Control Device Sysfs Attributes */
>> +/* version */
>> +static ssize_t show_version(struct device *dev, struct device_attribute *attr,
>> + char *buf)
>> +{
>> + struct axd_cmd *cmd = (struct axd_cmd *)dev->platform_data;
>> + int major, minor, patch;
>> +
>> + axd_cmd_get_version(cmd, &major, &minor, &patch);
>> + return sprintf(buf, "%u.%u.%u\n", major, minor, patch);
>> +}
>> +static DEVICE_ATTR(version, RD_PERMS, show_version, NULL);
> DEVICE_ATTR_RO() please. Same for all other instances, you should never
> use DEVICE_ATTR() anymore.
>
> thanks,
>
> greg k-h

OK. I missed the transition to the new macro. I'll fix that.

Thanks,
Qais


\
 
 \ /
  Last update: 2014-10-28 16:21    [W:0.067 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site