Re: [PATCH] hid: migrate Dream Cheeky LED driver from USB misc to HID

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

 



On Tue, 2016-06-14 at 21:34 +0200, Heiner Kallweit wrote:
> Am 14.06.2016 um 10:05 schrieb Oliver Neukum:
> > On Tue, 2016-06-14 at 07:51 +0200, Heiner Kallweit wrote:
> > 
> >> +	ret = hid_hw_start(hdev, HID_CONNECT_HIDRAW);
> >> +	if (ret)
> >> +		return ret;
> >> +
> >> +	minor = ((struct hidraw *) hdev->hidraw)->minor;
> >> +
> >> +	ret = dc_init_device(dcdev);
> > 
> > That is a race condition. You announced an uninitialized device to the
> > rest of the system.
> > 
> I don't see a race. The hdev and lock elements of dcdev are initialized

You have called hid_hw_start(). That implies that the device be ready.

> and dc_init_device just calls dc_send to send the init command to the device.
> It doesn't announce anything.

You send the init command after the rest of the system already sees the
device.

	Regards
		Oliver


--
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