diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-17 18:41:10 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-17 18:41:10 -0300 |
commit | e1f327f167fa9e97945bd55a18f3c4d002874ac2 (patch) | |
tree | 555d56f1918193e5851b8ec051a3102222f6b034 /linux/drivers/media/video/em28xx/em28xx-dvb.c | |
parent | 294c4f3e70bd1a21e967f15900141cb1dd152aff (diff) | |
download | mediapointer-dvb-s2-e1f327f167fa9e97945bd55a18f3c4d002874ac2.tar.gz mediapointer-dvb-s2-e1f327f167fa9e97945bd55a18f3c4d002874ac2.tar.bz2 |
CodingStyle fixes
From: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/em28xx/em28xx-dvb.c')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-dvb.c | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-dvb.c b/linux/drivers/media/video/em28xx/em28xx-dvb.c index 2bc993755..cae256b74 100644 --- a/linux/drivers/media/video/em28xx/em28xx-dvb.c +++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c @@ -51,7 +51,7 @@ struct em28xx_dvb { struct dvb_frontend *frontend; /* feed count management */ -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 15) struct mutex lock; #else struct semaphore lock; @@ -59,7 +59,7 @@ struct em28xx_dvb { int nfeeds; /* general boilerplate stuff */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) struct dvb_adapter adapter; #else struct dvb_adapter *adapter; @@ -106,7 +106,8 @@ static inline void print_err_status(struct em28xx *dev, if (packet < 0) { dprintk(1, "URB status %d [%s].\n", status, errmsg); } else { - dprintk(1, "URB packet %d, status %d [%s].\n", packet, status, errmsg); + dprintk(1, "URB packet %d, status %d [%s].\n", + packet, status, errmsg); } } @@ -143,18 +144,20 @@ static inline int dvb_isoc_copy(struct em28xx *dev, struct urb *urb) return 0; } -static int start_streaming(struct em28xx_dvb* dvb) { +static int start_streaming(struct em28xx_dvb *dvb) +{ struct em28xx *dev = dvb->adapter.priv; usb_set_interface(dev->udev, 0, 1); - dev->em28xx_write_regs_req(dev,0x00,0x48,"\x00",1); + dev->em28xx_write_regs_req(dev, 0x00, 0x48, "\x00", 1); return em28xx_init_isoc(dev, EM28XX_DVB_MAX_PACKETS, EM28XX_DVB_NUM_BUFS, EM28XX_DVB_MAX_PACKETSIZE, dvb_isoc_copy, EM28XX_DIGITAL_CAPTURE); } -static int stop_streaming(struct em28xx_dvb* dvb) { +static int stop_streaming(struct em28xx_dvb *dvb) +{ struct em28xx *dev = dvb->adapter.priv; em28xx_uninit_isoc(dev); @@ -176,7 +179,8 @@ static int start_feed(struct dvb_demux_feed *feed) if (dvb->nfeeds == 1) { ret = start_streaming(dvb); - if(ret < 0) rc = ret; + if (ret < 0) + rc = ret; } mutex_unlock(&dvb->lock); @@ -191,9 +195,10 @@ static int stop_feed(struct dvb_demux_feed *feed) mutex_lock(&dvb->lock); dvb->nfeeds--; - if (0 == dvb->nfeeds) { + + if (0 == dvb->nfeeds) err = stop_streaming(dvb); - } + mutex_unlock(&dvb->lock); return err; } @@ -221,7 +226,7 @@ static int attach_xc3028(u8 addr, struct em28xx *dev) struct xc2028_ctrl ctl; struct xc2028_config cfg; - memset (&cfg, 0, sizeof(cfg)); + memset(&cfg, 0, sizeof(cfg)); cfg.i2c_adap = &dev->i2c_adap; cfg.i2c_addr = addr; cfg.ctrl = &ctl; @@ -270,7 +275,7 @@ int register_dvb(struct em28xx_dvb *dvb, dev->name, result); goto fail_adapter; } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) dvb->adapter.priv = dev; /* register frontend */ @@ -306,7 +311,7 @@ int register_dvb(struct em28xx_dvb *dvb, dvb->dmxdev.filternum = 256; dvb->dmxdev.demux = &dvb->demux.dmx; dvb->dmxdev.capabilities = 0; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) result = dvb_dmxdev_init(&dvb->dmxdev, &dvb->adapter); #else result = dvb_dmxdev_init(&dvb->dmxdev, dvb->adapter); @@ -341,7 +346,7 @@ int register_dvb(struct em28xx_dvb *dvb, } /* register network adapter */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) dvb_net_init(&dvb->adapter, &dvb->net, &dvb->demux.dmx); #else dvb_net_init(dvb->adapter, &dvb->net, &dvb->demux.dmx); @@ -360,7 +365,7 @@ fail_dmx: dvb_unregister_frontend(dvb->frontend); fail_frontend: dvb_frontend_detach(dvb->frontend); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) dvb_unregister_adapter(&dvb->adapter); #else dvb_unregister_adapter(dvb->adapter); @@ -378,7 +383,7 @@ static void unregister_dvb(struct em28xx_dvb *dvb) dvb_dmx_release(&dvb->demux); dvb_unregister_frontend(dvb->frontend); dvb_frontend_detach(dvb->frontend); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) dvb_unregister_adapter(&dvb->adapter); #else dvb_unregister_adapter(dvb->adapter); @@ -392,8 +397,9 @@ static int dvb_init(struct em28xx *dev) struct em28xx_dvb *dvb; dvb = kzalloc(sizeof(struct em28xx_dvb), GFP_KERNEL); - if(dvb == NULL) { - printk("em28xx_dvb: memory allocation failed\n"); + + if (dvb == NULL) { + printk(KERN_INFO "em28xx_dvb: memory allocation failed\n"); return -ENOMEM; } dev->dvb = dvb; @@ -442,9 +448,8 @@ static int dvb_init(struct em28xx *dev) /* register everything */ result = register_dvb(dvb, THIS_MODULE, dev, &dev->udev->dev); - if (result < 0) { + if (result < 0) goto out_free; - } printk(KERN_INFO "Successfully loaded em28xx-dvb\n"); return 0; |