diff options
author | Jarod Wilson <jarod@redhat.com> | 2011-07-14 18:06:08 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-09-03 10:17:39 -0400 |
commit | f2d0c1c625bc79aa524b52eea2de4262a9be1d90 (patch) | |
tree | ffa6aae43469df69103f99264026aeda6c816434 /drivers/media/video/em28xx/em28xx-dvb.c | |
parent | 2f00e158b59bf83b8e6bc84130ac291a28827e76 (diff) |
[media] em28xx: add em28xx_ prefix to functions
Makes it more straight-forward to follow stack traces if the functions
don't have generic names. Using this as a crutch while trying to better
understand the lockdep warnings I get when loading the em28xx driver.
CC: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-dvb.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-dvb.c | 58 |
1 files changed, 28 insertions, 30 deletions
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c index 47b4cfa423d2..b3406ebd57d7 100644 --- a/drivers/media/video/em28xx/em28xx-dvb.c +++ b/drivers/media/video/em28xx/em28xx-dvb.c | |||
@@ -122,7 +122,7 @@ static inline void print_err_status(struct em28xx *dev, | |||
122 | } | 122 | } |
123 | } | 123 | } |
124 | 124 | ||
125 | static inline int dvb_isoc_copy(struct em28xx *dev, struct urb *urb) | 125 | static inline int em28xx_dvb_isoc_copy(struct em28xx *dev, struct urb *urb) |
126 | { | 126 | { |
127 | int i; | 127 | int i; |
128 | 128 | ||
@@ -155,7 +155,7 @@ static inline int dvb_isoc_copy(struct em28xx *dev, struct urb *urb) | |||
155 | return 0; | 155 | return 0; |
156 | } | 156 | } |
157 | 157 | ||
158 | static int start_streaming(struct em28xx_dvb *dvb) | 158 | static int em28xx_start_streaming(struct em28xx_dvb *dvb) |
159 | { | 159 | { |
160 | int rc; | 160 | int rc; |
161 | struct em28xx *dev = dvb->adapter.priv; | 161 | struct em28xx *dev = dvb->adapter.priv; |
@@ -175,10 +175,10 @@ static int start_streaming(struct em28xx_dvb *dvb) | |||
175 | 175 | ||
176 | return em28xx_init_isoc(dev, EM28XX_DVB_MAX_PACKETS, | 176 | return em28xx_init_isoc(dev, EM28XX_DVB_MAX_PACKETS, |
177 | EM28XX_DVB_NUM_BUFS, max_dvb_packet_size, | 177 | EM28XX_DVB_NUM_BUFS, max_dvb_packet_size, |
178 | dvb_isoc_copy); | 178 | em28xx_dvb_isoc_copy); |
179 | } | 179 | } |
180 | 180 | ||
181 | static int stop_streaming(struct em28xx_dvb *dvb) | 181 | static int em28xx_stop_streaming(struct em28xx_dvb *dvb) |
182 | { | 182 | { |
183 | struct em28xx *dev = dvb->adapter.priv; | 183 | struct em28xx *dev = dvb->adapter.priv; |
184 | 184 | ||
@@ -189,7 +189,7 @@ static int stop_streaming(struct em28xx_dvb *dvb) | |||
189 | return 0; | 189 | return 0; |
190 | } | 190 | } |
191 | 191 | ||
192 | static int start_feed(struct dvb_demux_feed *feed) | 192 | static int em28xx_start_feed(struct dvb_demux_feed *feed) |
193 | { | 193 | { |
194 | struct dvb_demux *demux = feed->demux; | 194 | struct dvb_demux *demux = feed->demux; |
195 | struct em28xx_dvb *dvb = demux->priv; | 195 | struct em28xx_dvb *dvb = demux->priv; |
@@ -203,7 +203,7 @@ static int start_feed(struct dvb_demux_feed *feed) | |||
203 | rc = dvb->nfeeds; | 203 | rc = dvb->nfeeds; |
204 | 204 | ||
205 | if (dvb->nfeeds == 1) { | 205 | if (dvb->nfeeds == 1) { |
206 | ret = start_streaming(dvb); | 206 | ret = em28xx_start_streaming(dvb); |
207 | if (ret < 0) | 207 | if (ret < 0) |
208 | rc = ret; | 208 | rc = ret; |
209 | } | 209 | } |
@@ -212,7 +212,7 @@ static int start_feed(struct dvb_demux_feed *feed) | |||
212 | return rc; | 212 | return rc; |
213 | } | 213 | } |
214 | 214 | ||
215 | static int stop_feed(struct dvb_demux_feed *feed) | 215 | static int em28xx_stop_feed(struct dvb_demux_feed *feed) |
216 | { | 216 | { |
217 | struct dvb_demux *demux = feed->demux; | 217 | struct dvb_demux *demux = feed->demux; |
218 | struct em28xx_dvb *dvb = demux->priv; | 218 | struct em28xx_dvb *dvb = demux->priv; |
@@ -222,7 +222,7 @@ static int stop_feed(struct dvb_demux_feed *feed) | |||
222 | dvb->nfeeds--; | 222 | dvb->nfeeds--; |
223 | 223 | ||
224 | if (0 == dvb->nfeeds) | 224 | if (0 == dvb->nfeeds) |
225 | err = stop_streaming(dvb); | 225 | err = em28xx_stop_streaming(dvb); |
226 | 226 | ||
227 | mutex_unlock(&dvb->lock); | 227 | mutex_unlock(&dvb->lock); |
228 | return err; | 228 | return err; |
@@ -380,7 +380,7 @@ static void terratec_h5_init(struct em28xx *dev) | |||
380 | em28xx_gpio_set(dev, terratec_h5_end); | 380 | em28xx_gpio_set(dev, terratec_h5_end); |
381 | }; | 381 | }; |
382 | 382 | ||
383 | static int mt352_terratec_xs_init(struct dvb_frontend *fe) | 383 | static int em28xx_mt352_terratec_xs_init(struct dvb_frontend *fe) |
384 | { | 384 | { |
385 | /* Values extracted from a USB trace of the Terratec Windows driver */ | 385 | /* Values extracted from a USB trace of the Terratec Windows driver */ |
386 | static u8 clock_config[] = { CLOCK_CTL, 0x38, 0x2c }; | 386 | static u8 clock_config[] = { CLOCK_CTL, 0x38, 0x2c }; |
@@ -412,7 +412,7 @@ static struct mt352_config terratec_xs_mt352_cfg = { | |||
412 | .demod_address = (0x1e >> 1), | 412 | .demod_address = (0x1e >> 1), |
413 | .no_tuner = 1, | 413 | .no_tuner = 1, |
414 | .if2 = 45600, | 414 | .if2 = 45600, |
415 | .demod_init = mt352_terratec_xs_init, | 415 | .demod_init = em28xx_mt352_terratec_xs_init, |
416 | }; | 416 | }; |
417 | 417 | ||
418 | static struct tda10023_config em28xx_tda10023_config = { | 418 | static struct tda10023_config em28xx_tda10023_config = { |
@@ -442,7 +442,7 @@ static struct tda18271_config em28xx_cxd2820r_tda18271_config = { | |||
442 | 442 | ||
443 | /* ------------------------------------------------------------------ */ | 443 | /* ------------------------------------------------------------------ */ |
444 | 444 | ||
445 | static int attach_xc3028(u8 addr, struct em28xx *dev) | 445 | static int em28xx_attach_xc3028(u8 addr, struct em28xx *dev) |
446 | { | 446 | { |
447 | struct dvb_frontend *fe; | 447 | struct dvb_frontend *fe; |
448 | struct xc2028_config cfg; | 448 | struct xc2028_config cfg; |
@@ -472,10 +472,8 @@ static int attach_xc3028(u8 addr, struct em28xx *dev) | |||
472 | 472 | ||
473 | /* ------------------------------------------------------------------ */ | 473 | /* ------------------------------------------------------------------ */ |
474 | 474 | ||
475 | static int register_dvb(struct em28xx_dvb *dvb, | 475 | static int em28xx_register_dvb(struct em28xx_dvb *dvb, struct module *module, |
476 | struct module *module, | 476 | struct em28xx *dev, struct device *device) |
477 | struct em28xx *dev, | ||
478 | struct device *device) | ||
479 | { | 477 | { |
480 | int result; | 478 | int result; |
481 | 479 | ||
@@ -522,8 +520,8 @@ static int register_dvb(struct em28xx_dvb *dvb, | |||
522 | dvb->demux.priv = dvb; | 520 | dvb->demux.priv = dvb; |
523 | dvb->demux.filternum = 256; | 521 | dvb->demux.filternum = 256; |
524 | dvb->demux.feednum = 256; | 522 | dvb->demux.feednum = 256; |
525 | dvb->demux.start_feed = start_feed; | 523 | dvb->demux.start_feed = em28xx_start_feed; |
526 | dvb->demux.stop_feed = stop_feed; | 524 | dvb->demux.stop_feed = em28xx_stop_feed; |
527 | 525 | ||
528 | result = dvb_dmx_init(&dvb->demux); | 526 | result = dvb_dmx_init(&dvb->demux); |
529 | if (result < 0) { | 527 | if (result < 0) { |
@@ -591,7 +589,7 @@ fail_adapter: | |||
591 | return result; | 589 | return result; |
592 | } | 590 | } |
593 | 591 | ||
594 | static void unregister_dvb(struct em28xx_dvb *dvb) | 592 | static void em28xx_unregister_dvb(struct em28xx_dvb *dvb) |
595 | { | 593 | { |
596 | dvb_net_release(&dvb->net); | 594 | dvb_net_release(&dvb->net); |
597 | dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem); | 595 | dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem); |
@@ -607,7 +605,7 @@ static void unregister_dvb(struct em28xx_dvb *dvb) | |||
607 | dvb_unregister_adapter(&dvb->adapter); | 605 | dvb_unregister_adapter(&dvb->adapter); |
608 | } | 606 | } |
609 | 607 | ||
610 | static int dvb_init(struct em28xx *dev) | 608 | static int em28xx_dvb_init(struct em28xx *dev) |
611 | { | 609 | { |
612 | int result = 0, mfe_shared = 0; | 610 | int result = 0, mfe_shared = 0; |
613 | struct em28xx_dvb *dvb; | 611 | struct em28xx_dvb *dvb; |
@@ -648,7 +646,7 @@ static int dvb_init(struct em28xx *dev) | |||
648 | dvb->fe[0] = dvb_attach(lgdt330x_attach, | 646 | dvb->fe[0] = dvb_attach(lgdt330x_attach, |
649 | &em2880_lgdt3303_dev, | 647 | &em2880_lgdt3303_dev, |
650 | &dev->i2c_adap); | 648 | &dev->i2c_adap); |
651 | if (attach_xc3028(0x61, dev) < 0) { | 649 | if (em28xx_attach_xc3028(0x61, dev) < 0) { |
652 | result = -EINVAL; | 650 | result = -EINVAL; |
653 | goto out_free; | 651 | goto out_free; |
654 | } | 652 | } |
@@ -657,7 +655,7 @@ static int dvb_init(struct em28xx *dev) | |||
657 | dvb->fe[0] = dvb_attach(zl10353_attach, | 655 | dvb->fe[0] = dvb_attach(zl10353_attach, |
658 | &em28xx_zl10353_with_xc3028, | 656 | &em28xx_zl10353_with_xc3028, |
659 | &dev->i2c_adap); | 657 | &dev->i2c_adap); |
660 | if (attach_xc3028(0x61, dev) < 0) { | 658 | if (em28xx_attach_xc3028(0x61, dev) < 0) { |
661 | result = -EINVAL; | 659 | result = -EINVAL; |
662 | goto out_free; | 660 | goto out_free; |
663 | } | 661 | } |
@@ -668,7 +666,7 @@ static int dvb_init(struct em28xx *dev) | |||
668 | dvb->fe[0] = dvb_attach(zl10353_attach, | 666 | dvb->fe[0] = dvb_attach(zl10353_attach, |
669 | &em28xx_zl10353_xc3028_no_i2c_gate, | 667 | &em28xx_zl10353_xc3028_no_i2c_gate, |
670 | &dev->i2c_adap); | 668 | &dev->i2c_adap); |
671 | if (attach_xc3028(0x61, dev) < 0) { | 669 | if (em28xx_attach_xc3028(0x61, dev) < 0) { |
672 | result = -EINVAL; | 670 | result = -EINVAL; |
673 | goto out_free; | 671 | goto out_free; |
674 | } | 672 | } |
@@ -689,7 +687,7 @@ static int dvb_init(struct em28xx *dev) | |||
689 | &dev->i2c_adap); | 687 | &dev->i2c_adap); |
690 | } | 688 | } |
691 | 689 | ||
692 | if (attach_xc3028(0x61, dev) < 0) { | 690 | if (em28xx_attach_xc3028(0x61, dev) < 0) { |
693 | result = -EINVAL; | 691 | result = -EINVAL; |
694 | goto out_free; | 692 | goto out_free; |
695 | } | 693 | } |
@@ -699,7 +697,7 @@ static int dvb_init(struct em28xx *dev) | |||
699 | dvb->fe[0] = dvb_attach(s5h1409_attach, | 697 | dvb->fe[0] = dvb_attach(s5h1409_attach, |
700 | &em28xx_s5h1409_with_xc3028, | 698 | &em28xx_s5h1409_with_xc3028, |
701 | &dev->i2c_adap); | 699 | &dev->i2c_adap); |
702 | if (attach_xc3028(0x61, dev) < 0) { | 700 | if (em28xx_attach_xc3028(0x61, dev) < 0) { |
703 | result = -EINVAL; | 701 | result = -EINVAL; |
704 | goto out_free; | 702 | goto out_free; |
705 | } | 703 | } |
@@ -720,7 +718,7 @@ static int dvb_init(struct em28xx *dev) | |||
720 | case EM2882_BOARD_PINNACLE_HYBRID_PRO_330E: | 718 | case EM2882_BOARD_PINNACLE_HYBRID_PRO_330E: |
721 | dvb->fe[0] = dvb_attach(drxd_attach, &em28xx_drxd, NULL, | 719 | dvb->fe[0] = dvb_attach(drxd_attach, &em28xx_drxd, NULL, |
722 | &dev->i2c_adap, &dev->udev->dev); | 720 | &dev->i2c_adap, &dev->udev->dev); |
723 | if (attach_xc3028(0x61, dev) < 0) { | 721 | if (em28xx_attach_xc3028(0x61, dev) < 0) { |
724 | result = -EINVAL; | 722 | result = -EINVAL; |
725 | goto out_free; | 723 | goto out_free; |
726 | } | 724 | } |
@@ -825,7 +823,7 @@ static int dvb_init(struct em28xx *dev) | |||
825 | dvb->fe[0]->callback = em28xx_tuner_callback; | 823 | dvb->fe[0]->callback = em28xx_tuner_callback; |
826 | 824 | ||
827 | /* register everything */ | 825 | /* register everything */ |
828 | result = register_dvb(dvb, THIS_MODULE, dev, &dev->udev->dev); | 826 | result = em28xx_register_dvb(dvb, THIS_MODULE, dev, &dev->udev->dev); |
829 | 827 | ||
830 | if (result < 0) | 828 | if (result < 0) |
831 | goto out_free; | 829 | goto out_free; |
@@ -845,7 +843,7 @@ out_free: | |||
845 | goto ret; | 843 | goto ret; |
846 | } | 844 | } |
847 | 845 | ||
848 | static int dvb_fini(struct em28xx *dev) | 846 | static int em28xx_dvb_fini(struct em28xx *dev) |
849 | { | 847 | { |
850 | if (!dev->board.has_dvb) { | 848 | if (!dev->board.has_dvb) { |
851 | /* This device does not support the extension */ | 849 | /* This device does not support the extension */ |
@@ -853,7 +851,7 @@ static int dvb_fini(struct em28xx *dev) | |||
853 | } | 851 | } |
854 | 852 | ||
855 | if (dev->dvb) { | 853 | if (dev->dvb) { |
856 | unregister_dvb(dev->dvb); | 854 | em28xx_unregister_dvb(dev->dvb); |
857 | kfree(dev->dvb); | 855 | kfree(dev->dvb); |
858 | dev->dvb = NULL; | 856 | dev->dvb = NULL; |
859 | } | 857 | } |
@@ -864,8 +862,8 @@ static int dvb_fini(struct em28xx *dev) | |||
864 | static struct em28xx_ops dvb_ops = { | 862 | static struct em28xx_ops dvb_ops = { |
865 | .id = EM28XX_DVB, | 863 | .id = EM28XX_DVB, |
866 | .name = "Em28xx dvb Extension", | 864 | .name = "Em28xx dvb Extension", |
867 | .init = dvb_init, | 865 | .init = em28xx_dvb_init, |
868 | .fini = dvb_fini, | 866 | .fini = em28xx_dvb_fini, |
869 | }; | 867 | }; |
870 | 868 | ||
871 | static int __init em28xx_dvb_register(void) | 869 | static int __init em28xx_dvb_register(void) |