]> git.karo-electronics.de Git - karo-tx-linux.git/commit
media: Fix media device minor registration
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 30 May 2011 18:45:47 +0000 (15:45 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 23 Jun 2011 22:05:36 +0000 (15:05 -0700)
commit69694054d5004619d095cdcd1346cf291068a84d
treefea7a2184aa8e6db1fd5648212e0bdb57737fca5
parente18e2fa510632dbbfcabc8f60c817f4a8576b11f
media: Fix media device minor registration

commit 8c89ddd536bbe97c1e50424778a139abbf5763c3 upstream.

The find_next_zero_bit() is called with the from and to arguments in the
wrong order. This results in the function always returning 0, and all
media devices being registered with minor 0. Furthermore, mdev->minor is
then used before being assigned with the find_next_zero_bit() return
value. This really makes sure we'll always use minor 0.

Fix this and let the system support more than one media device.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/media-devnode.c