On Mon, Mar 27, 2017 at 09:00:06AM +0200, Krzysztof Opasiak wrote: > >+static ssize_t ncontrollers_show(struct device *dev, struct > >device_attribute *attr, > >+ char *out) > >+{ > >+ char *s = out; > >+ > >+ out += sprintf(out, "%d\n", vhci_num_controllers); > >+ return out - s; > >+} > >+static DEVICE_ATTR_RO(ncontrollers); > >+ > > Why you need a special RO attribute for this? Can't just cannot > check content of directory using for example scandir() to learn what > we have? We can learn or somebody simply tells, I chose the latter. This makes it easier as the changelog says? -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
- [PATCH 0/6] usb: usbip: Fix ports and port status Yuyang Du
- [PATCH 3/6] usb: usbip: Export the number of VHCI c... Yuyang Du
- Re: [PATCH 3/6] usb: usbip: Export the number o... Krzysztof Opasiak
- Re: [PATCH 3/6] usb: usbip: Export the numb... Yuyang Du
- [PATCH 2/6] usb: usbip tool: Fix get_nports() Yuyang Du
- Re: [PATCH 2/6] usb: usbip tool: Fix get_nports... Krzysztof Opasiak
- Re: [PATCH 2/6] usb: usbip tool: Fix get_np... Yuyang Du
- Re: [PATCH 2/6] usb: usbip tool: Fix ge... Shuah Khan
- [PATCH 1/6] usb: usbip: Remove unnecessary get_vdev... Yuyang Du
- Re: [PATCH 1/6] usb: usbip: Remove unnecessary ... Krzysztof Opasiak
- Re: [PATCH 1/6] usb: usbip: Remove unnecess... Krzysztof Opasiak
- [PATCH 4/6] usb: usbip tool: Add ncontrollers in vh... Yuyang Du
- Re: [PATCH 4/6] usb: usbip tool: Add ncontrolle... Krzysztof Opasiak
- [PATCH 6/6] usb: usbip tool: Fix parse_status() Yuyang Du