Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 601139e0 authored by Trent Piepho's avatar Trent Piepho Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (10223): zoran: Remove global device array



The driver was keeping a global array with an entry for each zoran device
probed.  It was a leftover from when the driver didn't dynamically allocate
the driver data for each device.

There was only one use left, in the video device's ->open() method, looking
up the struct zoran for the opened device from the minor number.  This can
be done better with video_get_drvdata().

Since zoran_num is now only used in the pci driver's ->probe() method, it
doesn't need to be an atomic_t and be static.  There is a race if multiple
zoran cards could be probed at the same time, but currently the probe
method for a given driver is single threaded.

Signed-off-by: default avatarTrent Piepho <xyzzy@speakeasy.org>
Acked-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 45bdcefe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment