All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Jiri Kosina <jikos@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	linux-input@vger.kernel.org,
	Linux USB Mailing List <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] hid: migrate Dream Cheeky LED driver from USB misc to HID
Date: Tue, 14 Jun 2016 21:57:32 +0200	[thread overview]
Message-ID: <1465934252.25380.2.camel@suse.com> (raw)
In-Reply-To: <9d2c2ae6-3340-55e4-03f5-1fc95b2517cb@gmail.com>

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



  reply	other threads:[~2016-06-14 20:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-14  5:51 [PATCH] hid: migrate Dream Cheeky LED driver from USB misc to HID Heiner Kallweit
2016-06-14  8:05 ` Oliver Neukum
2016-06-14 19:34   ` Heiner Kallweit
2016-06-14 19:57     ` Oliver Neukum [this message]
2016-06-14 20:58       ` Heiner Kallweit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1465934252.25380.2.camel@suse.com \
    --to=oneukum@suse.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hkallweit1@gmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.