Re: [PATCH 2/6] USB: move many drivers to use DEVICE_ATTR_RO

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

 



On Tue, 23 Jan 2018 11:24:06 +0100
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:

> +++ b/drivers/usb/class/usblp.c

> -static ssize_t usblp_show_ieee1284_id(struct device *dev, struct device_attribute *attr, char *buf)
> +static ssize_t ieee1284_id_show(struct device *dev, struct device_attribute *attr, char *buf)

> -static DEVICE_ATTR(ieee1284_id, S_IRUGO, usblp_show_ieee1284_id, NULL);
> +static DEVICE_ATTR_RO(ieee1284_id);

You know, I hate this interface a little: it's too implicit. Before,
one could hit '*' in vi and get to the function that implements it.
Now, you have to know the foo_show convention. But if you think
it's worth being a bit more explicit about "this is intended to
be a RO attribute", then okay.

Acked-by: Pete Zaitcev <zaitcev@xxxxxxxxxx>

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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux