V4L/DVB (8786): v4l2: remove the priv field, use dev_get_drvdata instead
Remove the priv field and let video_get/set_drvdata use dev_get_drvdata
and dev_set_drvdata instead.
Convert all drivers that still used priv directly.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/radio/radio-gemtek-pci.c b/drivers/media/radio/radio-gemtek-pci.c
index d65fd28..1f57f73 100644
--- a/drivers/media/radio/radio-gemtek-pci.c
+++ b/drivers/media/radio/radio-gemtek-pci.c
@@ -205,7 +205,7 @@
struct v4l2_tuner *v)
{
struct video_device *dev = video_devdata(file);
- struct gemtek_pci_card *card = dev->priv;
+ struct gemtek_pci_card *card = video_get_drvdata(dev);
if (v->index > 0)
return -EINVAL;
@@ -233,7 +233,7 @@
struct v4l2_frequency *f)
{
struct video_device *dev = video_devdata(file);
- struct gemtek_pci_card *card = dev->priv;
+ struct gemtek_pci_card *card = video_get_drvdata(dev);
if ( (f->frequency < GEMTEK_PCI_RANGE_LOW) ||
(f->frequency > GEMTEK_PCI_RANGE_HIGH) )
@@ -248,7 +248,7 @@
struct v4l2_frequency *f)
{
struct video_device *dev = video_devdata(file);
- struct gemtek_pci_card *card = dev->priv;
+ struct gemtek_pci_card *card = video_get_drvdata(dev);
f->type = V4L2_TUNER_RADIO;
f->frequency = card->current_frequency;
@@ -273,7 +273,7 @@
struct v4l2_control *ctrl)
{
struct video_device *dev = video_devdata(file);
- struct gemtek_pci_card *card = dev->priv;
+ struct gemtek_pci_card *card = video_get_drvdata(dev);
switch (ctrl->id) {
case V4L2_CID_AUDIO_MUTE:
@@ -293,7 +293,7 @@
struct v4l2_control *ctrl)
{
struct video_device *dev = video_devdata(file);
- struct gemtek_pci_card *card = dev->priv;
+ struct gemtek_pci_card *card = video_get_drvdata(dev);
switch (ctrl->id) {
case V4L2_CID_AUDIO_MUTE:
@@ -442,7 +442,7 @@
}
card->videodev = devradio;
- devradio->priv = card;
+ video_set_drvdata(devradio, card);
gemtek_pci_mute( card );
printk( KERN_INFO "Gemtek PCI Radio (rev. %d) found at 0x%04x-0x%04x.\n",