From: Jiri Slaby Date: Tue, 10 Jan 2006 04:52:50 +0000 (-0800) Subject: [PATCH] media-radio: Maestro avoid accessing private structures directly X-Git-Tag: v2.6.16-rc1~568 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f86e7767990c0d63f0630cbf6018b6996f9ecde5;p=linux-2.6 [PATCH] media-radio: Maestro avoid accessing private structures directly video_device.priv is not allowed to touch and it will be actually removed in near future. Use video_get_drvdata() instead. Signed-off-by: Jiri Slaby Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/media/radio/radio-maestro.c b/drivers/media/radio/radio-maestro.c index f662912ef8..a77da35eeb 100644 --- a/drivers/media/radio/radio-maestro.c +++ b/drivers/media/radio/radio-maestro.c @@ -180,7 +180,7 @@ static inline int radio_function(struct inode *inode, struct file *file, unsigned int cmd, void *arg) { struct video_device *dev = video_devdata(file); - struct radio_device *card = dev->priv; + struct radio_device *card = video_get_drvdata(dev); switch (cmd) { case VIDIOCGCAP: { @@ -256,7 +256,7 @@ static int radio_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { struct video_device *dev = video_devdata(file); - struct radio_device *card = dev->priv; + struct radio_device *card = video_get_drvdata(dev); int ret; down(&card->lock);