Thread (43 messages) 43 messages, 6 authors, 2014-06-23

Re: [PATCH v10] leds: USB: HID: Add support for MSI GT683R led panels

From: Greg KH <hidden>
Date: 2014-06-23 18:24:48
Also in: linux-leds, lkml

Possibly related (same subject, not in this thread)

On Mon, Jun 23, 2014 at 02:23:24PM -0400, Greg KH wrote:
On Mon, Jun 23, 2014 at 08:16:48PM +0300, Janne Kanniainen wrote:
quoted
+	ret = sysfs_create_group(&led->hdev->dev.kobj, &gt683r_attribute_group);
+	if (ret) {
+		hid_err(hdev, "failed to create sysfs attributes\n");
+		goto fail;
+	}
No, you need to set the attribute group _before_ you call
led_classdev_register, as that is where the device will be created in
sysfs.  Surely the other led drivers already do this?  I'm almost afraid
to go look...
Yes, they do it already, set .dev_attr_group and you should be fine.

thanks,

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help