diff options
author | Johannes Stezenbach <js@linuxtv.org> | 2005-05-17 00:54:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-17 10:59:28 -0400 |
commit | 0c53c70f6afa2d3f4d416d8c0e9a219c2f6b7cb6 (patch) | |
tree | ed3b8a0253d45f1b0a7a80b2aff1a0ee0302f1b9 | |
parent | 2d4f2c2e15795b93fa4da7a7cfac5e82df51b1f1 (diff) |
[PATCH] dvb: remove unnecessary casts in dvb-core
remove unnecessary casts in dvb-core (Kenneth Aafloy)
Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/media/dvb/dvb-core/dmxdev.c | 32 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_ca_en50221.c | 38 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 34 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_net.c | 40 |
4 files changed, 72 insertions, 72 deletions
diff --git a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c index 1863f1dfb00c..c225de7ffd82 100644 --- a/drivers/media/dvb/dvb-core/dmxdev.c +++ b/drivers/media/dvb/dvb-core/dmxdev.c | |||
@@ -175,8 +175,8 @@ static inline void dvb_dmxdev_dvr_state_set(struct dmxdev_dvr *dmxdevdvr, int st | |||
175 | 175 | ||
176 | static int dvb_dvr_open(struct inode *inode, struct file *file) | 176 | static int dvb_dvr_open(struct inode *inode, struct file *file) |
177 | { | 177 | { |
178 | struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; | 178 | struct dvb_device *dvbdev = file->private_data; |
179 | struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv; | 179 | struct dmxdev *dmxdev = dvbdev->priv; |
180 | struct dmx_frontend *front; | 180 | struct dmx_frontend *front; |
181 | 181 | ||
182 | dprintk ("function : %s\n", __FUNCTION__); | 182 | dprintk ("function : %s\n", __FUNCTION__); |
@@ -224,8 +224,8 @@ static int dvb_dvr_open(struct inode *inode, struct file *file) | |||
224 | 224 | ||
225 | static int dvb_dvr_release(struct inode *inode, struct file *file) | 225 | static int dvb_dvr_release(struct inode *inode, struct file *file) |
226 | { | 226 | { |
227 | struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; | 227 | struct dvb_device *dvbdev = file->private_data; |
228 | struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv; | 228 | struct dmxdev *dmxdev = dvbdev->priv; |
229 | 229 | ||
230 | if (down_interruptible (&dmxdev->mutex)) | 230 | if (down_interruptible (&dmxdev->mutex)) |
231 | return -ERESTARTSYS; | 231 | return -ERESTARTSYS; |
@@ -252,8 +252,8 @@ static int dvb_dvr_release(struct inode *inode, struct file *file) | |||
252 | static ssize_t dvb_dvr_write(struct file *file, const char __user *buf, | 252 | static ssize_t dvb_dvr_write(struct file *file, const char __user *buf, |
253 | size_t count, loff_t *ppos) | 253 | size_t count, loff_t *ppos) |
254 | { | 254 | { |
255 | struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; | 255 | struct dvb_device *dvbdev = file->private_data; |
256 | struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv; | 256 | struct dmxdev *dmxdev = dvbdev->priv; |
257 | int ret; | 257 | int ret; |
258 | 258 | ||
259 | if (!dmxdev->demux->write) | 259 | if (!dmxdev->demux->write) |
@@ -270,8 +270,8 @@ static ssize_t dvb_dvr_write(struct file *file, const char __user *buf, | |||
270 | static ssize_t dvb_dvr_read(struct file *file, char __user *buf, size_t count, | 270 | static ssize_t dvb_dvr_read(struct file *file, char __user *buf, size_t count, |
271 | loff_t *ppos) | 271 | loff_t *ppos) |
272 | { | 272 | { |
273 | struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; | 273 | struct dvb_device *dvbdev = file->private_data; |
274 | struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv; | 274 | struct dmxdev *dmxdev = dvbdev->priv; |
275 | int ret; | 275 | int ret; |
276 | 276 | ||
277 | //down(&dmxdev->mutex); | 277 | //down(&dmxdev->mutex); |
@@ -345,7 +345,7 @@ static int dvb_dmxdev_section_callback(const u8 *buffer1, size_t buffer1_len, | |||
345 | const u8 *buffer2, size_t buffer2_len, | 345 | const u8 *buffer2, size_t buffer2_len, |
346 | struct dmx_section_filter *filter, enum dmx_success success) | 346 | struct dmx_section_filter *filter, enum dmx_success success) |
347 | { | 347 | { |
348 | struct dmxdev_filter *dmxdevfilter=(struct dmxdev_filter *) filter->priv; | 348 | struct dmxdev_filter *dmxdevfilter = filter->priv; |
349 | int ret; | 349 | int ret; |
350 | 350 | ||
351 | if (dmxdevfilter->buffer.error) { | 351 | if (dmxdevfilter->buffer.error) { |
@@ -381,7 +381,7 @@ static int dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len, | |||
381 | const u8 *buffer2, size_t buffer2_len, | 381 | const u8 *buffer2, size_t buffer2_len, |
382 | struct dmx_ts_feed *feed, enum dmx_success success) | 382 | struct dmx_ts_feed *feed, enum dmx_success success) |
383 | { | 383 | { |
384 | struct dmxdev_filter *dmxdevfilter=(struct dmxdev_filter *) feed->priv; | 384 | struct dmxdev_filter *dmxdevfilter = feed->priv; |
385 | struct dmxdev_buffer *buffer; | 385 | struct dmxdev_buffer *buffer; |
386 | int ret; | 386 | int ret; |
387 | 387 | ||
@@ -684,8 +684,8 @@ static int dvb_dmxdev_filter_start(struct dmxdev_filter *filter) | |||
684 | 684 | ||
685 | static int dvb_demux_open(struct inode *inode, struct file *file) | 685 | static int dvb_demux_open(struct inode *inode, struct file *file) |
686 | { | 686 | { |
687 | struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; | 687 | struct dvb_device *dvbdev = file->private_data; |
688 | struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv; | 688 | struct dmxdev *dmxdev = dvbdev->priv; |
689 | int i; | 689 | int i; |
690 | struct dmxdev_filter *dmxdevfilter; | 690 | struct dmxdev_filter *dmxdevfilter; |
691 | 691 | ||
@@ -1013,8 +1013,8 @@ static struct dvb_device dvbdev_demux = { | |||
1013 | static int dvb_dvr_do_ioctl(struct inode *inode, struct file *file, | 1013 | static int dvb_dvr_do_ioctl(struct inode *inode, struct file *file, |
1014 | unsigned int cmd, void *parg) | 1014 | unsigned int cmd, void *parg) |
1015 | { | 1015 | { |
1016 | struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; | 1016 | struct dvb_device *dvbdev = file->private_data; |
1017 | struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv; | 1017 | struct dmxdev *dmxdev = dvbdev->priv; |
1018 | 1018 | ||
1019 | int ret=0; | 1019 | int ret=0; |
1020 | 1020 | ||
@@ -1044,8 +1044,8 @@ static int dvb_dvr_ioctl(struct inode *inode, struct file *file, | |||
1044 | 1044 | ||
1045 | static unsigned int dvb_dvr_poll (struct file *file, poll_table *wait) | 1045 | static unsigned int dvb_dvr_poll (struct file *file, poll_table *wait) |
1046 | { | 1046 | { |
1047 | struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; | 1047 | struct dvb_device *dvbdev = file->private_data; |
1048 | struct dmxdev *dmxdev = (struct dmxdev *) dvbdev->priv; | 1048 | struct dmxdev *dmxdev = dvbdev->priv; |
1049 | unsigned int mask = 0; | 1049 | unsigned int mask = 0; |
1050 | 1050 | ||
1051 | dprintk ("function : %s\n", __FUNCTION__); | 1051 | dprintk ("function : %s\n", __FUNCTION__); |
diff --git a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c index c1ea89f2880c..0eb9aa711fb0 100644 --- a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c +++ b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c | |||
@@ -829,7 +829,7 @@ EXPORT_SYMBOL(dvb_ca_en50221_camready_irq); | |||
829 | */ | 829 | */ |
830 | void dvb_ca_en50221_camchange_irq(struct dvb_ca_en50221 *pubca, int slot, int change_type) | 830 | void dvb_ca_en50221_camchange_irq(struct dvb_ca_en50221 *pubca, int slot, int change_type) |
831 | { | 831 | { |
832 | struct dvb_ca_private *ca = (struct dvb_ca_private *) pubca->private; | 832 | struct dvb_ca_private *ca = pubca->private; |
833 | 833 | ||
834 | dprintk("CAMCHANGE IRQ slot:%i change_type:%i\n", slot, change_type); | 834 | dprintk("CAMCHANGE IRQ slot:%i change_type:%i\n", slot, change_type); |
835 | 835 | ||
@@ -857,7 +857,7 @@ EXPORT_SYMBOL(dvb_ca_en50221_frda_irq); | |||
857 | */ | 857 | */ |
858 | void dvb_ca_en50221_camready_irq(struct dvb_ca_en50221 *pubca, int slot) | 858 | void dvb_ca_en50221_camready_irq(struct dvb_ca_en50221 *pubca, int slot) |
859 | { | 859 | { |
860 | struct dvb_ca_private *ca = (struct dvb_ca_private *) pubca->private; | 860 | struct dvb_ca_private *ca = pubca->private; |
861 | 861 | ||
862 | dprintk("CAMREADY IRQ slot:%i\n", slot); | 862 | dprintk("CAMREADY IRQ slot:%i\n", slot); |
863 | 863 | ||
@@ -876,7 +876,7 @@ void dvb_ca_en50221_camready_irq(struct dvb_ca_en50221 *pubca, int slot) | |||
876 | */ | 876 | */ |
877 | void dvb_ca_en50221_frda_irq(struct dvb_ca_en50221 *pubca, int slot) | 877 | void dvb_ca_en50221_frda_irq(struct dvb_ca_en50221 *pubca, int slot) |
878 | { | 878 | { |
879 | struct dvb_ca_private *ca = (struct dvb_ca_private *) pubca->private; | 879 | struct dvb_ca_private *ca = pubca->private; |
880 | int flags; | 880 | int flags; |
881 | 881 | ||
882 | dprintk("FR/DA IRQ slot:%i\n", slot); | 882 | dprintk("FR/DA IRQ slot:%i\n", slot); |
@@ -993,7 +993,7 @@ static void dvb_ca_en50221_thread_update_delay(struct dvb_ca_private *ca) | |||
993 | */ | 993 | */ |
994 | static int dvb_ca_en50221_thread(void *data) | 994 | static int dvb_ca_en50221_thread(void *data) |
995 | { | 995 | { |
996 | struct dvb_ca_private *ca = (struct dvb_ca_private *) data; | 996 | struct dvb_ca_private *ca = data; |
997 | char name[15]; | 997 | char name[15]; |
998 | int slot; | 998 | int slot; |
999 | int flags; | 999 | int flags; |
@@ -1202,8 +1202,8 @@ static int dvb_ca_en50221_thread(void *data) | |||
1202 | static int dvb_ca_en50221_io_do_ioctl(struct inode *inode, struct file *file, | 1202 | static int dvb_ca_en50221_io_do_ioctl(struct inode *inode, struct file *file, |
1203 | unsigned int cmd, void *parg) | 1203 | unsigned int cmd, void *parg) |
1204 | { | 1204 | { |
1205 | struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; | 1205 | struct dvb_device *dvbdev = file->private_data; |
1206 | struct dvb_ca_private *ca = (struct dvb_ca_private *) dvbdev->priv; | 1206 | struct dvb_ca_private *ca = dvbdev->priv; |
1207 | int err = 0; | 1207 | int err = 0; |
1208 | int slot; | 1208 | int slot; |
1209 | 1209 | ||
@@ -1225,7 +1225,7 @@ static int dvb_ca_en50221_io_do_ioctl(struct inode *inode, struct file *file, | |||
1225 | break; | 1225 | break; |
1226 | 1226 | ||
1227 | case CA_GET_CAP: { | 1227 | case CA_GET_CAP: { |
1228 | struct ca_caps *caps = (struct ca_caps *) parg; | 1228 | struct ca_caps *caps = parg; |
1229 | 1229 | ||
1230 | caps->slot_num = ca->slot_count; | 1230 | caps->slot_num = ca->slot_count; |
1231 | caps->slot_type = CA_CI_LINK; | 1231 | caps->slot_type = CA_CI_LINK; |
@@ -1235,7 +1235,7 @@ static int dvb_ca_en50221_io_do_ioctl(struct inode *inode, struct file *file, | |||
1235 | } | 1235 | } |
1236 | 1236 | ||
1237 | case CA_GET_SLOT_INFO: { | 1237 | case CA_GET_SLOT_INFO: { |
1238 | struct ca_slot_info *info = (struct ca_slot_info *) parg; | 1238 | struct ca_slot_info *info = parg; |
1239 | 1239 | ||
1240 | if ((info->num > ca->slot_count) || (info->num < 0)) | 1240 | if ((info->num > ca->slot_count) || (info->num < 0)) |
1241 | return -EINVAL; | 1241 | return -EINVAL; |
@@ -1291,8 +1291,8 @@ static int dvb_ca_en50221_io_ioctl(struct inode *inode, struct file *file, | |||
1291 | static ssize_t dvb_ca_en50221_io_write(struct file *file, | 1291 | static ssize_t dvb_ca_en50221_io_write(struct file *file, |
1292 | const char __user * buf, size_t count, loff_t * ppos) | 1292 | const char __user * buf, size_t count, loff_t * ppos) |
1293 | { | 1293 | { |
1294 | struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; | 1294 | struct dvb_device *dvbdev = file->private_data; |
1295 | struct dvb_ca_private *ca = (struct dvb_ca_private *) dvbdev->priv; | 1295 | struct dvb_ca_private *ca = dvbdev->priv; |
1296 | u8 slot, connection_id; | 1296 | u8 slot, connection_id; |
1297 | int status; | 1297 | int status; |
1298 | char fragbuf[HOST_LINK_BUF_SIZE]; | 1298 | char fragbuf[HOST_LINK_BUF_SIZE]; |
@@ -1428,8 +1428,8 @@ static int dvb_ca_en50221_io_read_condition(struct dvb_ca_private *ca, int *resu | |||
1428 | static ssize_t dvb_ca_en50221_io_read(struct file *file, char __user * buf, | 1428 | static ssize_t dvb_ca_en50221_io_read(struct file *file, char __user * buf, |
1429 | size_t count, loff_t * ppos) | 1429 | size_t count, loff_t * ppos) |
1430 | { | 1430 | { |
1431 | struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; | 1431 | struct dvb_device *dvbdev = file->private_data; |
1432 | struct dvb_ca_private *ca = (struct dvb_ca_private *) dvbdev->priv; | 1432 | struct dvb_ca_private *ca = dvbdev->priv; |
1433 | int status; | 1433 | int status; |
1434 | int result = 0; | 1434 | int result = 0; |
1435 | u8 hdr[2]; | 1435 | u8 hdr[2]; |
@@ -1526,8 +1526,8 @@ static ssize_t dvb_ca_en50221_io_read(struct file *file, char __user * buf, | |||
1526 | */ | 1526 | */ |
1527 | static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file) | 1527 | static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file) |
1528 | { | 1528 | { |
1529 | struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; | 1529 | struct dvb_device *dvbdev = file->private_data; |
1530 | struct dvb_ca_private *ca = (struct dvb_ca_private *) dvbdev->priv; | 1530 | struct dvb_ca_private *ca = dvbdev->priv; |
1531 | int err; | 1531 | int err; |
1532 | int i; | 1532 | int i; |
1533 | 1533 | ||
@@ -1569,8 +1569,8 @@ static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file) | |||
1569 | */ | 1569 | */ |
1570 | static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file) | 1570 | static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file) |
1571 | { | 1571 | { |
1572 | struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; | 1572 | struct dvb_device *dvbdev = file->private_data; |
1573 | struct dvb_ca_private *ca = (struct dvb_ca_private *) dvbdev->priv; | 1573 | struct dvb_ca_private *ca = dvbdev->priv; |
1574 | int err = 0; | 1574 | int err = 0; |
1575 | 1575 | ||
1576 | dprintk("%s\n", __FUNCTION__); | 1576 | dprintk("%s\n", __FUNCTION__); |
@@ -1597,8 +1597,8 @@ static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file) | |||
1597 | */ | 1597 | */ |
1598 | static unsigned int dvb_ca_en50221_io_poll(struct file *file, poll_table * wait) | 1598 | static unsigned int dvb_ca_en50221_io_poll(struct file *file, poll_table * wait) |
1599 | { | 1599 | { |
1600 | struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; | 1600 | struct dvb_device *dvbdev = file->private_data; |
1601 | struct dvb_ca_private *ca = (struct dvb_ca_private *) dvbdev->priv; | 1601 | struct dvb_ca_private *ca = dvbdev->priv; |
1602 | unsigned int mask = 0; | 1602 | unsigned int mask = 0; |
1603 | int slot; | 1603 | int slot; |
1604 | int result = 0; | 1604 | int result = 0; |
@@ -1750,7 +1750,7 @@ EXPORT_SYMBOL(dvb_ca_en50221_release); | |||
1750 | */ | 1750 | */ |
1751 | void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca) | 1751 | void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca) |
1752 | { | 1752 | { |
1753 | struct dvb_ca_private *ca = (struct dvb_ca_private *) pubca->private; | 1753 | struct dvb_ca_private *ca = pubca->private; |
1754 | int i; | 1754 | int i; |
1755 | 1755 | ||
1756 | dprintk("%s\n", __FUNCTION__); | 1756 | dprintk("%s\n", __FUNCTION__); |
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 3f94afb02c61..d19301d90a09 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -117,7 +117,7 @@ struct dvb_frontend_private { | |||
117 | 117 | ||
118 | static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status) | 118 | static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status) |
119 | { | 119 | { |
120 | struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv; | 120 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
121 | struct dvb_fe_events *events = &fepriv->events; | 121 | struct dvb_fe_events *events = &fepriv->events; |
122 | struct dvb_frontend_event *e; | 122 | struct dvb_frontend_event *e; |
123 | int wp; | 123 | int wp; |
@@ -155,7 +155,7 @@ static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status) | |||
155 | static int dvb_frontend_get_event(struct dvb_frontend *fe, | 155 | static int dvb_frontend_get_event(struct dvb_frontend *fe, |
156 | struct dvb_frontend_event *event, int flags) | 156 | struct dvb_frontend_event *event, int flags) |
157 | { | 157 | { |
158 | struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv; | 158 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
159 | struct dvb_fe_events *events = &fepriv->events; | 159 | struct dvb_fe_events *events = &fepriv->events; |
160 | 160 | ||
161 | dprintk ("%s\n", __FUNCTION__); | 161 | dprintk ("%s\n", __FUNCTION__); |
@@ -234,7 +234,7 @@ static int dvb_frontend_autotune(struct dvb_frontend *fe, int check_wrapped) | |||
234 | { | 234 | { |
235 | int autoinversion; | 235 | int autoinversion; |
236 | int ready = 0; | 236 | int ready = 0; |
237 | struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv; | 237 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
238 | int original_inversion = fepriv->parameters.inversion; | 238 | int original_inversion = fepriv->parameters.inversion; |
239 | u32 original_frequency = fepriv->parameters.frequency; | 239 | u32 original_frequency = fepriv->parameters.frequency; |
240 | 240 | ||
@@ -321,7 +321,7 @@ static int dvb_frontend_autotune(struct dvb_frontend *fe, int check_wrapped) | |||
321 | 321 | ||
322 | static int dvb_frontend_is_exiting(struct dvb_frontend *fe) | 322 | static int dvb_frontend_is_exiting(struct dvb_frontend *fe) |
323 | { | 323 | { |
324 | struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv; | 324 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
325 | 325 | ||
326 | if (fepriv->exit) | 326 | if (fepriv->exit) |
327 | return 1; | 327 | return 1; |
@@ -335,7 +335,7 @@ static int dvb_frontend_is_exiting(struct dvb_frontend *fe) | |||
335 | 335 | ||
336 | static int dvb_frontend_should_wakeup(struct dvb_frontend *fe) | 336 | static int dvb_frontend_should_wakeup(struct dvb_frontend *fe) |
337 | { | 337 | { |
338 | struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv; | 338 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
339 | 339 | ||
340 | if (fepriv->wakeup) { | 340 | if (fepriv->wakeup) { |
341 | fepriv->wakeup = 0; | 341 | fepriv->wakeup = 0; |
@@ -346,7 +346,7 @@ static int dvb_frontend_should_wakeup(struct dvb_frontend *fe) | |||
346 | 346 | ||
347 | static void dvb_frontend_wakeup(struct dvb_frontend *fe) | 347 | static void dvb_frontend_wakeup(struct dvb_frontend *fe) |
348 | { | 348 | { |
349 | struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv; | 349 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
350 | 350 | ||
351 | fepriv->wakeup = 1; | 351 | fepriv->wakeup = 1; |
352 | wake_up_interruptible(&fepriv->wait_queue); | 352 | wake_up_interruptible(&fepriv->wait_queue); |
@@ -357,8 +357,8 @@ static void dvb_frontend_wakeup(struct dvb_frontend *fe) | |||
357 | */ | 357 | */ |
358 | static int dvb_frontend_thread(void *data) | 358 | static int dvb_frontend_thread(void *data) |
359 | { | 359 | { |
360 | struct dvb_frontend *fe = (struct dvb_frontend *) data; | 360 | struct dvb_frontend *fe = data; |
361 | struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv; | 361 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
362 | unsigned long timeout; | 362 | unsigned long timeout; |
363 | char name [15]; | 363 | char name [15]; |
364 | int quality = 0, delay = 3*HZ; | 364 | int quality = 0, delay = 3*HZ; |
@@ -520,7 +520,7 @@ static int dvb_frontend_thread(void *data) | |||
520 | static void dvb_frontend_stop(struct dvb_frontend *fe) | 520 | static void dvb_frontend_stop(struct dvb_frontend *fe) |
521 | { | 521 | { |
522 | unsigned long ret; | 522 | unsigned long ret; |
523 | struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv; | 523 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
524 | 524 | ||
525 | dprintk ("%s\n", __FUNCTION__); | 525 | dprintk ("%s\n", __FUNCTION__); |
526 | 526 | ||
@@ -559,7 +559,7 @@ static void dvb_frontend_stop(struct dvb_frontend *fe) | |||
559 | static int dvb_frontend_start(struct dvb_frontend *fe) | 559 | static int dvb_frontend_start(struct dvb_frontend *fe) |
560 | { | 560 | { |
561 | int ret; | 561 | int ret; |
562 | struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv; | 562 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
563 | 563 | ||
564 | dprintk ("%s\n", __FUNCTION__); | 564 | dprintk ("%s\n", __FUNCTION__); |
565 | 565 | ||
@@ -597,7 +597,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, | |||
597 | { | 597 | { |
598 | struct dvb_device *dvbdev = file->private_data; | 598 | struct dvb_device *dvbdev = file->private_data; |
599 | struct dvb_frontend *fe = dvbdev->priv; | 599 | struct dvb_frontend *fe = dvbdev->priv; |
600 | struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv; | 600 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
601 | int err = -EOPNOTSUPP; | 601 | int err = -EOPNOTSUPP; |
602 | 602 | ||
603 | dprintk ("%s\n", __FUNCTION__); | 603 | dprintk ("%s\n", __FUNCTION__); |
@@ -615,7 +615,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, | |||
615 | 615 | ||
616 | switch (cmd) { | 616 | switch (cmd) { |
617 | case FE_GET_INFO: { | 617 | case FE_GET_INFO: { |
618 | struct dvb_frontend_info* info = (struct dvb_frontend_info*) parg; | 618 | struct dvb_frontend_info* info = parg; |
619 | memcpy(info, &fe->ops->info, sizeof(struct dvb_frontend_info)); | 619 | memcpy(info, &fe->ops->info, sizeof(struct dvb_frontend_info)); |
620 | 620 | ||
621 | /* Force the CAN_INVERSION_AUTO bit on. If the frontend doesn't | 621 | /* Force the CAN_INVERSION_AUTO bit on. If the frontend doesn't |
@@ -793,7 +793,7 @@ static unsigned int dvb_frontend_poll(struct file *file, struct poll_table_struc | |||
793 | { | 793 | { |
794 | struct dvb_device *dvbdev = file->private_data; | 794 | struct dvb_device *dvbdev = file->private_data; |
795 | struct dvb_frontend *fe = dvbdev->priv; | 795 | struct dvb_frontend *fe = dvbdev->priv; |
796 | struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv; | 796 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
797 | 797 | ||
798 | dprintk ("%s\n", __FUNCTION__); | 798 | dprintk ("%s\n", __FUNCTION__); |
799 | 799 | ||
@@ -809,7 +809,7 @@ static int dvb_frontend_open(struct inode *inode, struct file *file) | |||
809 | { | 809 | { |
810 | struct dvb_device *dvbdev = file->private_data; | 810 | struct dvb_device *dvbdev = file->private_data; |
811 | struct dvb_frontend *fe = dvbdev->priv; | 811 | struct dvb_frontend *fe = dvbdev->priv; |
812 | struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv; | 812 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
813 | int ret; | 813 | int ret; |
814 | 814 | ||
815 | dprintk ("%s\n", __FUNCTION__); | 815 | dprintk ("%s\n", __FUNCTION__); |
@@ -833,7 +833,7 @@ static int dvb_frontend_release(struct inode *inode, struct file *file) | |||
833 | { | 833 | { |
834 | struct dvb_device *dvbdev = file->private_data; | 834 | struct dvb_device *dvbdev = file->private_data; |
835 | struct dvb_frontend *fe = dvbdev->priv; | 835 | struct dvb_frontend *fe = dvbdev->priv; |
836 | struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv; | 836 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
837 | 837 | ||
838 | dprintk ("%s\n", __FUNCTION__); | 838 | dprintk ("%s\n", __FUNCTION__); |
839 | 839 | ||
@@ -873,7 +873,7 @@ int dvb_register_frontend(struct dvb_adapter* dvb, | |||
873 | up(&frontend_mutex); | 873 | up(&frontend_mutex); |
874 | return -ENOMEM; | 874 | return -ENOMEM; |
875 | } | 875 | } |
876 | fepriv = (struct dvb_frontend_private*) fe->frontend_priv; | 876 | fepriv = fe->frontend_priv; |
877 | memset(fe->frontend_priv, 0, sizeof(struct dvb_frontend_private)); | 877 | memset(fe->frontend_priv, 0, sizeof(struct dvb_frontend_private)); |
878 | 878 | ||
879 | init_MUTEX (&fepriv->sem); | 879 | init_MUTEX (&fepriv->sem); |
@@ -897,7 +897,7 @@ EXPORT_SYMBOL(dvb_register_frontend); | |||
897 | 897 | ||
898 | int dvb_unregister_frontend(struct dvb_frontend* fe) | 898 | int dvb_unregister_frontend(struct dvb_frontend* fe) |
899 | { | 899 | { |
900 | struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv; | 900 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
901 | dprintk ("%s\n", __FUNCTION__); | 901 | dprintk ("%s\n", __FUNCTION__); |
902 | 902 | ||
903 | down (&frontend_mutex); | 903 | down (&frontend_mutex); |
diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c index 44892e7abd3d..997199cc5801 100644 --- a/drivers/media/dvb/dvb-core/dvb_net.c +++ b/drivers/media/dvb/dvb-core/dvb_net.c | |||
@@ -315,7 +315,7 @@ static inline void reset_ule( struct dvb_net_priv *p ) | |||
315 | */ | 315 | */ |
316 | static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len ) | 316 | static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len ) |
317 | { | 317 | { |
318 | struct dvb_net_priv *priv = (struct dvb_net_priv *)dev->priv; | 318 | struct dvb_net_priv *priv = dev->priv; |
319 | unsigned long skipped = 0L; | 319 | unsigned long skipped = 0L; |
320 | u8 *ts, *ts_end, *from_where = NULL, ts_remain = 0, how_much = 0, new_ts = 1; | 320 | u8 *ts, *ts_end, *from_where = NULL, ts_remain = 0, how_much = 0, new_ts = 1; |
321 | struct ethhdr *ethh = NULL; | 321 | struct ethhdr *ethh = NULL; |
@@ -709,7 +709,7 @@ static int dvb_net_ts_callback(const u8 *buffer1, size_t buffer1_len, | |||
709 | const u8 *buffer2, size_t buffer2_len, | 709 | const u8 *buffer2, size_t buffer2_len, |
710 | struct dmx_ts_feed *feed, enum dmx_success success) | 710 | struct dmx_ts_feed *feed, enum dmx_success success) |
711 | { | 711 | { |
712 | struct net_device *dev = (struct net_device *)feed->priv; | 712 | struct net_device *dev = feed->priv; |
713 | 713 | ||
714 | if (buffer2 != 0) | 714 | if (buffer2 != 0) |
715 | printk(KERN_WARNING "buffer2 not 0: %p.\n", buffer2); | 715 | printk(KERN_WARNING "buffer2 not 0: %p.\n", buffer2); |
@@ -801,7 +801,7 @@ static int dvb_net_sec_callback(const u8 *buffer1, size_t buffer1_len, | |||
801 | struct dmx_section_filter *filter, | 801 | struct dmx_section_filter *filter, |
802 | enum dmx_success success) | 802 | enum dmx_success success) |
803 | { | 803 | { |
804 | struct net_device *dev=(struct net_device *) filter->priv; | 804 | struct net_device *dev = filter->priv; |
805 | 805 | ||
806 | /** | 806 | /** |
807 | * we rely on the DVB API definition where exactly one complete | 807 | * we rely on the DVB API definition where exactly one complete |
@@ -826,7 +826,7 @@ static int dvb_net_filter_sec_set(struct net_device *dev, | |||
826 | struct dmx_section_filter **secfilter, | 826 | struct dmx_section_filter **secfilter, |
827 | u8 *mac, u8 *mac_mask) | 827 | u8 *mac, u8 *mac_mask) |
828 | { | 828 | { |
829 | struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv; | 829 | struct dvb_net_priv *priv = dev->priv; |
830 | int ret; | 830 | int ret; |
831 | 831 | ||
832 | *secfilter=NULL; | 832 | *secfilter=NULL; |
@@ -870,7 +870,7 @@ static int dvb_net_filter_sec_set(struct net_device *dev, | |||
870 | static int dvb_net_feed_start(struct net_device *dev) | 870 | static int dvb_net_feed_start(struct net_device *dev) |
871 | { | 871 | { |
872 | int ret, i; | 872 | int ret, i; |
873 | struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv; | 873 | struct dvb_net_priv *priv = dev->priv; |
874 | struct dmx_demux *demux = priv->demux; | 874 | struct dmx_demux *demux = priv->demux; |
875 | unsigned char *mac = (unsigned char *) dev->dev_addr; | 875 | unsigned char *mac = (unsigned char *) dev->dev_addr; |
876 | 876 | ||
@@ -965,7 +965,7 @@ static int dvb_net_feed_start(struct net_device *dev) | |||
965 | 965 | ||
966 | static int dvb_net_feed_stop(struct net_device *dev) | 966 | static int dvb_net_feed_stop(struct net_device *dev) |
967 | { | 967 | { |
968 | struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv; | 968 | struct dvb_net_priv *priv = dev->priv; |
969 | int i; | 969 | int i; |
970 | 970 | ||
971 | dprintk("%s\n", __FUNCTION__); | 971 | dprintk("%s\n", __FUNCTION__); |
@@ -1016,7 +1016,7 @@ static int dvb_net_feed_stop(struct net_device *dev) | |||
1016 | 1016 | ||
1017 | static int dvb_set_mc_filter (struct net_device *dev, struct dev_mc_list *mc) | 1017 | static int dvb_set_mc_filter (struct net_device *dev, struct dev_mc_list *mc) |
1018 | { | 1018 | { |
1019 | struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv; | 1019 | struct dvb_net_priv *priv = dev->priv; |
1020 | 1020 | ||
1021 | if (priv->multi_num == DVB_NET_MULTICAST_MAX) | 1021 | if (priv->multi_num == DVB_NET_MULTICAST_MAX) |
1022 | return -ENOMEM; | 1022 | return -ENOMEM; |
@@ -1031,7 +1031,7 @@ static int dvb_set_mc_filter (struct net_device *dev, struct dev_mc_list *mc) | |||
1031 | static void wq_set_multicast_list (void *data) | 1031 | static void wq_set_multicast_list (void *data) |
1032 | { | 1032 | { |
1033 | struct net_device *dev = data; | 1033 | struct net_device *dev = data; |
1034 | struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv; | 1034 | struct dvb_net_priv *priv = dev->priv; |
1035 | 1035 | ||
1036 | dvb_net_feed_stop(dev); | 1036 | dvb_net_feed_stop(dev); |
1037 | 1037 | ||
@@ -1066,7 +1066,7 @@ static void wq_set_multicast_list (void *data) | |||
1066 | 1066 | ||
1067 | static void dvb_net_set_multicast_list (struct net_device *dev) | 1067 | static void dvb_net_set_multicast_list (struct net_device *dev) |
1068 | { | 1068 | { |
1069 | struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv; | 1069 | struct dvb_net_priv *priv = dev->priv; |
1070 | schedule_work(&priv->set_multicast_list_wq); | 1070 | schedule_work(&priv->set_multicast_list_wq); |
1071 | } | 1071 | } |
1072 | 1072 | ||
@@ -1084,7 +1084,7 @@ static void wq_restart_net_feed (void *data) | |||
1084 | 1084 | ||
1085 | static int dvb_net_set_mac (struct net_device *dev, void *p) | 1085 | static int dvb_net_set_mac (struct net_device *dev, void *p) |
1086 | { | 1086 | { |
1087 | struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv; | 1087 | struct dvb_net_priv *priv = dev->priv; |
1088 | struct sockaddr *addr=p; | 1088 | struct sockaddr *addr=p; |
1089 | 1089 | ||
1090 | memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); | 1090 | memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); |
@@ -1098,7 +1098,7 @@ static int dvb_net_set_mac (struct net_device *dev, void *p) | |||
1098 | 1098 | ||
1099 | static int dvb_net_open(struct net_device *dev) | 1099 | static int dvb_net_open(struct net_device *dev) |
1100 | { | 1100 | { |
1101 | struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv; | 1101 | struct dvb_net_priv *priv = dev->priv; |
1102 | 1102 | ||
1103 | priv->in_use++; | 1103 | priv->in_use++; |
1104 | dvb_net_feed_start(dev); | 1104 | dvb_net_feed_start(dev); |
@@ -1108,7 +1108,7 @@ static int dvb_net_open(struct net_device *dev) | |||
1108 | 1108 | ||
1109 | static int dvb_net_stop(struct net_device *dev) | 1109 | static int dvb_net_stop(struct net_device *dev) |
1110 | { | 1110 | { |
1111 | struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv; | 1111 | struct dvb_net_priv *priv = dev->priv; |
1112 | 1112 | ||
1113 | priv->in_use--; | 1113 | priv->in_use--; |
1114 | return dvb_net_feed_stop(dev); | 1114 | return dvb_net_feed_stop(dev); |
@@ -1228,8 +1228,8 @@ static int dvb_net_remove_if(struct dvb_net *dvbnet, unsigned int num) | |||
1228 | static int dvb_net_do_ioctl(struct inode *inode, struct file *file, | 1228 | static int dvb_net_do_ioctl(struct inode *inode, struct file *file, |
1229 | unsigned int cmd, void *parg) | 1229 | unsigned int cmd, void *parg) |
1230 | { | 1230 | { |
1231 | struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; | 1231 | struct dvb_device *dvbdev = file->private_data; |
1232 | struct dvb_net *dvbnet = (struct dvb_net *) dvbdev->priv; | 1232 | struct dvb_net *dvbnet = dvbdev->priv; |
1233 | 1233 | ||
1234 | if (((file->f_flags&O_ACCMODE)==O_RDONLY)) | 1234 | if (((file->f_flags&O_ACCMODE)==O_RDONLY)) |
1235 | return -EPERM; | 1235 | return -EPERM; |
@@ -1237,7 +1237,7 @@ static int dvb_net_do_ioctl(struct inode *inode, struct file *file, | |||
1237 | switch (cmd) { | 1237 | switch (cmd) { |
1238 | case NET_ADD_IF: | 1238 | case NET_ADD_IF: |
1239 | { | 1239 | { |
1240 | struct dvb_net_if *dvbnetif=(struct dvb_net_if *)parg; | 1240 | struct dvb_net_if *dvbnetif = parg; |
1241 | int result; | 1241 | int result; |
1242 | 1242 | ||
1243 | if (!capable(CAP_SYS_ADMIN)) | 1243 | if (!capable(CAP_SYS_ADMIN)) |
@@ -1258,7 +1258,7 @@ static int dvb_net_do_ioctl(struct inode *inode, struct file *file, | |||
1258 | { | 1258 | { |
1259 | struct net_device *netdev; | 1259 | struct net_device *netdev; |
1260 | struct dvb_net_priv *priv_data; | 1260 | struct dvb_net_priv *priv_data; |
1261 | struct dvb_net_if *dvbnetif=(struct dvb_net_if *)parg; | 1261 | struct dvb_net_if *dvbnetif = parg; |
1262 | 1262 | ||
1263 | if (dvbnetif->if_num >= DVB_NET_DEVICES_MAX || | 1263 | if (dvbnetif->if_num >= DVB_NET_DEVICES_MAX || |
1264 | !dvbnet->state[dvbnetif->if_num]) | 1264 | !dvbnet->state[dvbnetif->if_num]) |
@@ -1266,7 +1266,7 @@ static int dvb_net_do_ioctl(struct inode *inode, struct file *file, | |||
1266 | 1266 | ||
1267 | netdev = dvbnet->device[dvbnetif->if_num]; | 1267 | netdev = dvbnet->device[dvbnetif->if_num]; |
1268 | 1268 | ||
1269 | priv_data=(struct dvb_net_priv*)netdev->priv; | 1269 | priv_data = netdev->priv; |
1270 | dvbnetif->pid=priv_data->pid; | 1270 | dvbnetif->pid=priv_data->pid; |
1271 | dvbnetif->feedtype=priv_data->feedtype; | 1271 | dvbnetif->feedtype=priv_data->feedtype; |
1272 | break; | 1272 | break; |
@@ -1288,7 +1288,7 @@ static int dvb_net_do_ioctl(struct inode *inode, struct file *file, | |||
1288 | /* binary compatiblity cruft */ | 1288 | /* binary compatiblity cruft */ |
1289 | case __NET_ADD_IF_OLD: | 1289 | case __NET_ADD_IF_OLD: |
1290 | { | 1290 | { |
1291 | struct __dvb_net_if_old *dvbnetif=(struct __dvb_net_if_old *)parg; | 1291 | struct __dvb_net_if_old *dvbnetif = parg; |
1292 | int result; | 1292 | int result; |
1293 | 1293 | ||
1294 | if (!capable(CAP_SYS_ADMIN)) | 1294 | if (!capable(CAP_SYS_ADMIN)) |
@@ -1309,7 +1309,7 @@ static int dvb_net_do_ioctl(struct inode *inode, struct file *file, | |||
1309 | { | 1309 | { |
1310 | struct net_device *netdev; | 1310 | struct net_device *netdev; |
1311 | struct dvb_net_priv *priv_data; | 1311 | struct dvb_net_priv *priv_data; |
1312 | struct __dvb_net_if_old *dvbnetif=(struct __dvb_net_if_old *)parg; | 1312 | struct __dvb_net_if_old *dvbnetif = parg; |
1313 | 1313 | ||
1314 | if (dvbnetif->if_num >= DVB_NET_DEVICES_MAX || | 1314 | if (dvbnetif->if_num >= DVB_NET_DEVICES_MAX || |
1315 | !dvbnet->state[dvbnetif->if_num]) | 1315 | !dvbnet->state[dvbnetif->if_num]) |
@@ -1317,7 +1317,7 @@ static int dvb_net_do_ioctl(struct inode *inode, struct file *file, | |||
1317 | 1317 | ||
1318 | netdev = dvbnet->device[dvbnetif->if_num]; | 1318 | netdev = dvbnet->device[dvbnetif->if_num]; |
1319 | 1319 | ||
1320 | priv_data=(struct dvb_net_priv*)netdev->priv; | 1320 | priv_data = netdev->priv; |
1321 | dvbnetif->pid=priv_data->pid; | 1321 | dvbnetif->pid=priv_data->pid; |
1322 | break; | 1322 | break; |
1323 | } | 1323 | } |