diff options
author | Douglas Schilling Landgraf <dougsland@gmail.com> | 2008-04-17 20:41:10 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:09:41 -0400 |
commit | 6ea54d938b6f81baa0952a8b15d3e67e6c268b8f (patch) | |
tree | 3cda23563cf6f6f05927b7f7c61eaa6605a0e10d /drivers/media/video/em28xx/em28xx-dvb.c | |
parent | e6a353b0dc2686ae04805919e7a22430d2f1e29e (diff) |
V4L/DVB (7607): CodingStyle fixes
Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-dvb.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-dvb.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c index 64816ae106e3..21b8f1d48024 100644 --- a/drivers/media/video/em28xx/em28xx-dvb.c +++ b/drivers/media/video/em28xx/em28xx-dvb.c | |||
@@ -97,7 +97,8 @@ static inline void print_err_status(struct em28xx *dev, | |||
97 | if (packet < 0) { | 97 | if (packet < 0) { |
98 | dprintk(1, "URB status %d [%s].\n", status, errmsg); | 98 | dprintk(1, "URB status %d [%s].\n", status, errmsg); |
99 | } else { | 99 | } else { |
100 | dprintk(1, "URB packet %d, status %d [%s].\n", packet, status, errmsg); | 100 | dprintk(1, "URB packet %d, status %d [%s].\n", |
101 | packet, status, errmsg); | ||
101 | } | 102 | } |
102 | } | 103 | } |
103 | 104 | ||
@@ -134,18 +135,20 @@ static inline int dvb_isoc_copy(struct em28xx *dev, struct urb *urb) | |||
134 | return 0; | 135 | return 0; |
135 | } | 136 | } |
136 | 137 | ||
137 | static int start_streaming(struct em28xx_dvb* dvb) { | 138 | static int start_streaming(struct em28xx_dvb *dvb) |
139 | { | ||
138 | struct em28xx *dev = dvb->adapter.priv; | 140 | struct em28xx *dev = dvb->adapter.priv; |
139 | 141 | ||
140 | usb_set_interface(dev->udev, 0, 1); | 142 | usb_set_interface(dev->udev, 0, 1); |
141 | dev->em28xx_write_regs_req(dev,0x00,0x48,"\x00",1); | 143 | dev->em28xx_write_regs_req(dev, 0x00, 0x48, "\x00", 1); |
142 | 144 | ||
143 | return em28xx_init_isoc(dev, EM28XX_DVB_MAX_PACKETS, | 145 | return em28xx_init_isoc(dev, EM28XX_DVB_MAX_PACKETS, |
144 | EM28XX_DVB_NUM_BUFS, EM28XX_DVB_MAX_PACKETSIZE, | 146 | EM28XX_DVB_NUM_BUFS, EM28XX_DVB_MAX_PACKETSIZE, |
145 | dvb_isoc_copy, EM28XX_DIGITAL_CAPTURE); | 147 | dvb_isoc_copy, EM28XX_DIGITAL_CAPTURE); |
146 | } | 148 | } |
147 | 149 | ||
148 | static int stop_streaming(struct em28xx_dvb* dvb) { | 150 | static int stop_streaming(struct em28xx_dvb *dvb) |
151 | { | ||
149 | struct em28xx *dev = dvb->adapter.priv; | 152 | struct em28xx *dev = dvb->adapter.priv; |
150 | 153 | ||
151 | em28xx_uninit_isoc(dev); | 154 | em28xx_uninit_isoc(dev); |
@@ -167,7 +170,8 @@ static int start_feed(struct dvb_demux_feed *feed) | |||
167 | 170 | ||
168 | if (dvb->nfeeds == 1) { | 171 | if (dvb->nfeeds == 1) { |
169 | ret = start_streaming(dvb); | 172 | ret = start_streaming(dvb); |
170 | if(ret < 0) rc = ret; | 173 | if (ret < 0) |
174 | rc = ret; | ||
171 | } | 175 | } |
172 | 176 | ||
173 | mutex_unlock(&dvb->lock); | 177 | mutex_unlock(&dvb->lock); |
@@ -182,9 +186,10 @@ static int stop_feed(struct dvb_demux_feed *feed) | |||
182 | 186 | ||
183 | mutex_lock(&dvb->lock); | 187 | mutex_lock(&dvb->lock); |
184 | dvb->nfeeds--; | 188 | dvb->nfeeds--; |
185 | if (0 == dvb->nfeeds) { | 189 | |
190 | if (0 == dvb->nfeeds) | ||
186 | err = stop_streaming(dvb); | 191 | err = stop_streaming(dvb); |
187 | } | 192 | |
188 | mutex_unlock(&dvb->lock); | 193 | mutex_unlock(&dvb->lock); |
189 | return err; | 194 | return err; |
190 | } | 195 | } |
@@ -212,7 +217,7 @@ static int attach_xc3028(u8 addr, struct em28xx *dev) | |||
212 | struct xc2028_ctrl ctl; | 217 | struct xc2028_ctrl ctl; |
213 | struct xc2028_config cfg; | 218 | struct xc2028_config cfg; |
214 | 219 | ||
215 | memset (&cfg, 0, sizeof(cfg)); | 220 | memset(&cfg, 0, sizeof(cfg)); |
216 | cfg.i2c_adap = &dev->i2c_adap; | 221 | cfg.i2c_adap = &dev->i2c_adap; |
217 | cfg.i2c_addr = addr; | 222 | cfg.i2c_addr = addr; |
218 | cfg.ctrl = &ctl; | 223 | cfg.ctrl = &ctl; |
@@ -360,8 +365,9 @@ static int dvb_init(struct em28xx *dev) | |||
360 | struct em28xx_dvb *dvb; | 365 | struct em28xx_dvb *dvb; |
361 | 366 | ||
362 | dvb = kzalloc(sizeof(struct em28xx_dvb), GFP_KERNEL); | 367 | dvb = kzalloc(sizeof(struct em28xx_dvb), GFP_KERNEL); |
363 | if(dvb == NULL) { | 368 | |
364 | printk("em28xx_dvb: memory allocation failed\n"); | 369 | if (dvb == NULL) { |
370 | printk(KERN_INFO "em28xx_dvb: memory allocation failed\n"); | ||
365 | return -ENOMEM; | 371 | return -ENOMEM; |
366 | } | 372 | } |
367 | dev->dvb = dvb; | 373 | dev->dvb = dvb; |
@@ -410,9 +416,8 @@ static int dvb_init(struct em28xx *dev) | |||
410 | /* register everything */ | 416 | /* register everything */ |
411 | result = register_dvb(dvb, THIS_MODULE, dev, &dev->udev->dev); | 417 | result = register_dvb(dvb, THIS_MODULE, dev, &dev->udev->dev); |
412 | 418 | ||
413 | if (result < 0) { | 419 | if (result < 0) |
414 | goto out_free; | 420 | goto out_free; |
415 | } | ||
416 | 421 | ||
417 | printk(KERN_INFO "Successfully loaded em28xx-dvb\n"); | 422 | printk(KERN_INFO "Successfully loaded em28xx-dvb\n"); |
418 | return 0; | 423 | return 0; |