Commit 52e0a72a authored by Timofey Trofimov's avatar Timofey Trofimov Committed by Mauro Carvalho Chehab

V4L/DVB: Staging: tm6000: Fix coding style issues

Fixed coding style issues founded by checkpatch.pl in files:
tm6000-alsa.c,tm6000-cards, tm6000-core.c, tm6000-dvb.c, tm6000-i2c.c,
tm6000-stds.c, tm6000-usb-isoc.h, tm6000.h

[mchehab@redhat.com: Fix some compilation breakages]
Signed-off-by: default avatarTimofey Trofimov <tumoxep@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent cee3926f
...@@ -705,7 +705,7 @@ static void get_max_endpoint(struct usb_device *udev, ...@@ -705,7 +705,7 @@ static void get_max_endpoint(struct usb_device *udev,
unsigned int size = tmp & 0x7ff; unsigned int size = tmp & 0x7ff;
if (udev->speed == USB_SPEED_HIGH) if (udev->speed == USB_SPEED_HIGH)
size = size * hb_mult (tmp); size = size * hb_mult(tmp);
if (size > tm_ep->maxsize) { if (size > tm_ep->maxsize) {
tm_ep->endp = curr_e; tm_ep->endp = curr_e;
......
This diff is collapsed.
...@@ -44,12 +44,12 @@ static int debug; ...@@ -44,12 +44,12 @@ static int debug;
module_param(debug, int, 0644); module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "enable debug message"); MODULE_PARM_DESC(debug, "enable debug message");
static void inline print_err_status (struct tm6000_core *dev, static inline void print_err_status(struct tm6000_core *dev,
int packet, int status) int packet, int status)
{ {
char *errmsg = "Unknown"; char *errmsg = "Unknown";
switch(status) { switch (status) {
case -ENOENT: case -ENOENT:
errmsg = "unlinked synchronuously"; errmsg = "unlinked synchronuously";
break; break;
...@@ -75,7 +75,7 @@ static void inline print_err_status (struct tm6000_core *dev, ...@@ -75,7 +75,7 @@ static void inline print_err_status (struct tm6000_core *dev,
errmsg = "Device does not respond"; errmsg = "Device does not respond";
break; break;
} }
if (packet<0) { if (packet < 0) {
dprintk(dev, 1, "URB status %d [%s].\n", dprintk(dev, 1, "URB status %d [%s].\n",
status, errmsg); status, errmsg);
} else { } else {
...@@ -87,19 +87,17 @@ static void inline print_err_status (struct tm6000_core *dev, ...@@ -87,19 +87,17 @@ static void inline print_err_status (struct tm6000_core *dev,
static void tm6000_urb_received(struct urb *urb) static void tm6000_urb_received(struct urb *urb)
{ {
int ret; int ret;
struct tm6000_core* dev = urb->context; struct tm6000_core *dev = urb->context;
if(urb->status != 0) { if (urb->status != 0)
print_err_status (dev,0,urb->status); print_err_status(dev, 0, urb->status);
} else if (urb->actual_length > 0)
else if(urb->actual_length>0){
dvb_dmx_swfilter(&dev->dvb->demux, urb->transfer_buffer, dvb_dmx_swfilter(&dev->dvb->demux, urb->transfer_buffer,
urb->actual_length); urb->actual_length);
}
if(dev->dvb->streams > 0) { if (dev->dvb->streams > 0) {
ret = usb_submit_urb(urb, GFP_ATOMIC); ret = usb_submit_urb(urb, GFP_ATOMIC);
if(ret < 0) { if (ret < 0) {
printk(KERN_ERR "tm6000: error %s\n", __FUNCTION__); printk(KERN_ERR "tm6000: error %s\n", __FUNCTION__);
kfree(urb->transfer_buffer); kfree(urb->transfer_buffer);
usb_free_urb(urb); usb_free_urb(urb);
...@@ -113,7 +111,7 @@ int tm6000_start_stream(struct tm6000_core *dev) ...@@ -113,7 +111,7 @@ int tm6000_start_stream(struct tm6000_core *dev)
unsigned int pipe, size; unsigned int pipe, size;
struct tm6000_dvb *dvb = dev->dvb; struct tm6000_dvb *dvb = dev->dvb;
printk(KERN_INFO "tm6000: got start stream request %s\n",__FUNCTION__); printk(KERN_INFO "tm6000: got start stream request %s\n", __FUNCTION__);
if (dev->mode != TM6000_MODE_DIGITAL) { if (dev->mode != TM6000_MODE_DIGITAL) {
tm6000_init_digital_mode(dev); tm6000_init_digital_mode(dev);
...@@ -121,7 +119,7 @@ int tm6000_start_stream(struct tm6000_core *dev) ...@@ -121,7 +119,7 @@ int tm6000_start_stream(struct tm6000_core *dev)
} }
dvb->bulk_urb = usb_alloc_urb(0, GFP_KERNEL); dvb->bulk_urb = usb_alloc_urb(0, GFP_KERNEL);
if(dvb->bulk_urb == NULL) { if (dvb->bulk_urb == NULL) {
printk(KERN_ERR "tm6000: couldn't allocate urb\n"); printk(KERN_ERR "tm6000: couldn't allocate urb\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -133,7 +131,7 @@ int tm6000_start_stream(struct tm6000_core *dev) ...@@ -133,7 +131,7 @@ int tm6000_start_stream(struct tm6000_core *dev)
size = size * 15; /* 512 x 8 or 12 or 15 */ size = size * 15; /* 512 x 8 or 12 or 15 */
dvb->bulk_urb->transfer_buffer = kzalloc(size, GFP_KERNEL); dvb->bulk_urb->transfer_buffer = kzalloc(size, GFP_KERNEL);
if(dvb->bulk_urb->transfer_buffer == NULL) { if (dvb->bulk_urb->transfer_buffer == NULL) {
usb_free_urb(dvb->bulk_urb); usb_free_urb(dvb->bulk_urb);
printk(KERN_ERR "tm6000: couldn't allocate transfer buffer!\n"); printk(KERN_ERR "tm6000: couldn't allocate transfer buffer!\n");
return -ENOMEM; return -ENOMEM;
...@@ -145,20 +143,20 @@ int tm6000_start_stream(struct tm6000_core *dev) ...@@ -145,20 +143,20 @@ int tm6000_start_stream(struct tm6000_core *dev)
tm6000_urb_received, dev); tm6000_urb_received, dev);
ret = usb_clear_halt(dev->udev, pipe); ret = usb_clear_halt(dev->udev, pipe);
if(ret < 0) { if (ret < 0) {
printk(KERN_ERR "tm6000: error %i in %s during pipe reset\n",ret,__FUNCTION__); printk(KERN_ERR "tm6000: error %i in %s during pipe reset\n",
ret, __FUNCTION__);
return ret; return ret;
} } else
else {
printk(KERN_ERR "tm6000: pipe resetted\n"); printk(KERN_ERR "tm6000: pipe resetted\n");
}
/* mutex_lock(&tm6000_driver.open_close_mutex); */ /* mutex_lock(&tm6000_driver.open_close_mutex); */
ret = usb_submit_urb(dvb->bulk_urb, GFP_KERNEL); ret = usb_submit_urb(dvb->bulk_urb, GFP_KERNEL);
/* mutex_unlock(&tm6000_driver.open_close_mutex); */ /* mutex_unlock(&tm6000_driver.open_close_mutex); */
if (ret) { if (ret) {
printk(KERN_ERR "tm6000: submit of urb failed (error=%i)\n",ret); printk(KERN_ERR "tm6000: submit of urb failed (error=%i)\n",
ret);
kfree(dvb->bulk_urb->transfer_buffer); kfree(dvb->bulk_urb->transfer_buffer);
usb_free_urb(dvb->bulk_urb); usb_free_urb(dvb->bulk_urb);
...@@ -172,10 +170,10 @@ void tm6000_stop_stream(struct tm6000_core *dev) ...@@ -172,10 +170,10 @@ void tm6000_stop_stream(struct tm6000_core *dev)
{ {
struct tm6000_dvb *dvb = dev->dvb; struct tm6000_dvb *dvb = dev->dvb;
if(dvb->bulk_urb) { if (dvb->bulk_urb) {
printk (KERN_INFO "urb killing\n"); printk(KERN_INFO "urb killing\n");
usb_kill_urb(dvb->bulk_urb); usb_kill_urb(dvb->bulk_urb);
printk (KERN_INFO "urb buffer free\n"); printk(KERN_INFO "urb buffer free\n");
kfree(dvb->bulk_urb->transfer_buffer); kfree(dvb->bulk_urb->transfer_buffer);
usb_free_urb(dvb->bulk_urb); usb_free_urb(dvb->bulk_urb);
dvb->bulk_urb = NULL; dvb->bulk_urb = NULL;
...@@ -187,35 +185,34 @@ int tm6000_start_feed(struct dvb_demux_feed *feed) ...@@ -187,35 +185,34 @@ int tm6000_start_feed(struct dvb_demux_feed *feed)
struct dvb_demux *demux = feed->demux; struct dvb_demux *demux = feed->demux;
struct tm6000_core *dev = demux->priv; struct tm6000_core *dev = demux->priv;
struct tm6000_dvb *dvb = dev->dvb; struct tm6000_dvb *dvb = dev->dvb;
printk(KERN_INFO "tm6000: got start feed request %s\n",__FUNCTION__); printk(KERN_INFO "tm6000: got start feed request %s\n", __FUNCTION__);
mutex_lock(&dvb->mutex); mutex_lock(&dvb->mutex);
if(dvb->streams == 0) { if (dvb->streams == 0) {
dvb->streams = 1; dvb->streams = 1;
/* mutex_init(&tm6000_dev->streming_mutex); */ /* mutex_init(&tm6000_dev->streming_mutex); */
tm6000_start_stream(dev); tm6000_start_stream(dev);
} } else
else {
++(dvb->streams); ++(dvb->streams);
}
mutex_unlock(&dvb->mutex); mutex_unlock(&dvb->mutex);
return 0; return 0;
} }
int tm6000_stop_feed(struct dvb_demux_feed *feed) { int tm6000_stop_feed(struct dvb_demux_feed *feed)
{
struct dvb_demux *demux = feed->demux; struct dvb_demux *demux = feed->demux;
struct tm6000_core *dev = demux->priv; struct tm6000_core *dev = demux->priv;
struct tm6000_dvb *dvb = dev->dvb; struct tm6000_dvb *dvb = dev->dvb;
printk(KERN_INFO "tm6000: got stop feed request %s\n",__FUNCTION__); printk(KERN_INFO "tm6000: got stop feed request %s\n", __FUNCTION__);
mutex_lock(&dvb->mutex); mutex_lock(&dvb->mutex);
printk (KERN_INFO "stream %#x\n", dvb->streams); printk(KERN_INFO "stream %#x\n", dvb->streams);
--(dvb->streams); --(dvb->streams);
if(dvb->streams == 0) { if (dvb->streams == 0) {
printk (KERN_INFO "stop stream\n"); printk(KERN_INFO "stop stream\n");
tm6000_stop_stream(dev); tm6000_stop_stream(dev);
/* mutex_destroy(&tm6000_dev->streaming_mutex); */ /* mutex_destroy(&tm6000_dev->streaming_mutex); */
} }
...@@ -229,9 +226,9 @@ int tm6000_dvb_attach_frontend(struct tm6000_core *dev) ...@@ -229,9 +226,9 @@ int tm6000_dvb_attach_frontend(struct tm6000_core *dev)
{ {
struct tm6000_dvb *dvb = dev->dvb; struct tm6000_dvb *dvb = dev->dvb;
if(dev->caps.has_zl10353) { if (dev->caps.has_zl10353) {
struct zl10353_config config = struct zl10353_config config = {
{.demod_address = dev->demod_addr, .demod_address = dev->demod_addr,
.no_tuner = 1, .no_tuner = 1,
.parallel_ts = 1, .parallel_ts = 1,
.if2 = 45700, .if2 = 45700,
...@@ -240,8 +237,7 @@ int tm6000_dvb_attach_frontend(struct tm6000_core *dev) ...@@ -240,8 +237,7 @@ int tm6000_dvb_attach_frontend(struct tm6000_core *dev)
dvb->frontend = dvb_attach(zl10353_attach, &config, dvb->frontend = dvb_attach(zl10353_attach, &config,
&dev->i2c_adap); &dev->i2c_adap);
} } else {
else {
printk(KERN_ERR "tm6000: no frontend defined for the device!\n"); printk(KERN_ERR "tm6000: no frontend defined for the device!\n");
return -1; return -1;
} }
...@@ -262,13 +258,13 @@ int register_dvb(struct tm6000_core *dev) ...@@ -262,13 +258,13 @@ int register_dvb(struct tm6000_core *dev)
/* attach the frontend */ /* attach the frontend */
ret = tm6000_dvb_attach_frontend(dev); ret = tm6000_dvb_attach_frontend(dev);
if(ret < 0) { if (ret < 0) {
printk(KERN_ERR "tm6000: couldn't attach the frontend!\n"); printk(KERN_ERR "tm6000: couldn't attach the frontend!\n");
goto err; goto err;
} }
ret = dvb_register_adapter(&dvb->adapter, "Trident TVMaster 6000 DVB-T", ret = dvb_register_adapter(&dvb->adapter, "Trident TVMaster 6000 DVB-T",
THIS_MODULE, &dev->udev->dev, adapter_nr); THIS_MODULE, &dev->udev->dev, adapter_nr);
dvb->adapter.priv = dev; dvb->adapter.priv = dev;
if (dvb->frontend) { if (dvb->frontend) {
...@@ -321,9 +317,8 @@ int register_dvb(struct tm6000_core *dev) ...@@ -321,9 +317,8 @@ int register_dvb(struct tm6000_core *dev)
break; break;
} }
} }
} else { } else
printk(KERN_ERR "tm6000: no frontend found\n"); printk(KERN_ERR "tm6000: no frontend found\n");
}
dvb->demux.dmx.capabilities = DMX_TS_FILTERING | DMX_SECTION_FILTERING dvb->demux.dmx.capabilities = DMX_TS_FILTERING | DMX_SECTION_FILTERING
| DMX_MEMORY_BASED_FILTERING; | DMX_MEMORY_BASED_FILTERING;
...@@ -334,7 +329,7 @@ int register_dvb(struct tm6000_core *dev) ...@@ -334,7 +329,7 @@ int register_dvb(struct tm6000_core *dev)
dvb->demux.stop_feed = tm6000_stop_feed; dvb->demux.stop_feed = tm6000_stop_feed;
dvb->demux.write_to_decoder = NULL; dvb->demux.write_to_decoder = NULL;
ret = dvb_dmx_init(&dvb->demux); ret = dvb_dmx_init(&dvb->demux);
if(ret < 0) { if (ret < 0) {
printk("tm6000: dvb_dmx_init failed (errno = %d)\n", ret); printk("tm6000: dvb_dmx_init failed (errno = %d)\n", ret);
goto frontend_err; goto frontend_err;
} }
...@@ -344,7 +339,7 @@ int register_dvb(struct tm6000_core *dev) ...@@ -344,7 +339,7 @@ int register_dvb(struct tm6000_core *dev)
dvb->dmxdev.capabilities = 0; dvb->dmxdev.capabilities = 0;
ret = dvb_dmxdev_init(&dvb->dmxdev, &dvb->adapter); ret = dvb_dmxdev_init(&dvb->dmxdev, &dvb->adapter);
if(ret < 0) { if (ret < 0) {
printk("tm6000: dvb_dmxdev_init failed (errno = %d)\n", ret); printk("tm6000: dvb_dmxdev_init failed (errno = %d)\n", ret);
goto dvb_dmx_err; goto dvb_dmx_err;
} }
...@@ -354,7 +349,7 @@ int register_dvb(struct tm6000_core *dev) ...@@ -354,7 +349,7 @@ int register_dvb(struct tm6000_core *dev)
dvb_dmx_err: dvb_dmx_err:
dvb_dmx_release(&dvb->demux); dvb_dmx_release(&dvb->demux);
frontend_err: frontend_err:
if(dvb->frontend) { if (dvb->frontend) {
dvb_frontend_detach(dvb->frontend); dvb_frontend_detach(dvb->frontend);
dvb_unregister_frontend(dvb->frontend); dvb_unregister_frontend(dvb->frontend);
} }
...@@ -368,7 +363,7 @@ void unregister_dvb(struct tm6000_core *dev) ...@@ -368,7 +363,7 @@ void unregister_dvb(struct tm6000_core *dev)
{ {
struct tm6000_dvb *dvb = dev->dvb; struct tm6000_dvb *dvb = dev->dvb;
if(dvb->bulk_urb != NULL) { if (dvb->bulk_urb != NULL) {
struct urb *bulk_urb = dvb->bulk_urb; struct urb *bulk_urb = dvb->bulk_urb;
kfree(bulk_urb->transfer_buffer); kfree(bulk_urb->transfer_buffer);
...@@ -378,7 +373,7 @@ void unregister_dvb(struct tm6000_core *dev) ...@@ -378,7 +373,7 @@ void unregister_dvb(struct tm6000_core *dev)
} }
/* mutex_lock(&tm6000_driver.open_close_mutex); */ /* mutex_lock(&tm6000_driver.open_close_mutex); */
if(dvb->frontend) { if (dvb->frontend) {
dvb_frontend_detach(dvb->frontend); dvb_frontend_detach(dvb->frontend);
dvb_unregister_frontend(dvb->frontend); dvb_unregister_frontend(dvb->frontend);
} }
...@@ -388,7 +383,6 @@ void unregister_dvb(struct tm6000_core *dev) ...@@ -388,7 +383,6 @@ void unregister_dvb(struct tm6000_core *dev)
dvb_unregister_adapter(&dvb->adapter); dvb_unregister_adapter(&dvb->adapter);
mutex_destroy(&dvb->mutex); mutex_destroy(&dvb->mutex);
/* mutex_unlock(&tm6000_driver.open_close_mutex); */ /* mutex_unlock(&tm6000_driver.open_close_mutex); */
} }
static int dvb_init(struct tm6000_core *dev) static int dvb_init(struct tm6000_core *dev)
......
...@@ -40,7 +40,7 @@ static unsigned int i2c_debug = 0; ...@@ -40,7 +40,7 @@ static unsigned int i2c_debug = 0;
module_param(i2c_debug, int, 0644); module_param(i2c_debug, int, 0644);
MODULE_PARM_DESC(i2c_debug, "enable debug messages [i2c]"); MODULE_PARM_DESC(i2c_debug, "enable debug messages [i2c]");
#define i2c_dprintk(lvl,fmt, args...) if (i2c_debug>=lvl) do{ \ #define i2c_dprintk(lvl, fmt, args...) if (i2c_debug >= lvl) do { \
printk(KERN_DEBUG "%s at %s: " fmt, \ printk(KERN_DEBUG "%s at %s: " fmt, \
dev->name, __FUNCTION__ , ##args); } while (0) dev->name, __FUNCTION__ , ##args); } while (0)
...@@ -171,7 +171,7 @@ static int tm6000_i2c_xfer(struct i2c_adapter *i2c_adap, ...@@ -171,7 +171,7 @@ static int tm6000_i2c_xfer(struct i2c_adapter *i2c_adap,
return 0; return 0;
for (i = 0; i < num; i++) { for (i = 0; i < num; i++) {
addr = (msgs[i].addr << 1) & 0xff; addr = (msgs[i].addr << 1) & 0xff;
i2c_dprintk(2,"%s %s addr=0x%x len=%d:", i2c_dprintk(2, "%s %s addr=0x%x len=%d:",
(msgs[i].flags & I2C_M_RD) ? "read" : "write", (msgs[i].flags & I2C_M_RD) ? "read" : "write",
i == num - 1 ? "stop" : "nonstop", addr, msgs[i].len); i == num - 1 ? "stop" : "nonstop", addr, msgs[i].len);
if (msgs[i].flags & I2C_M_RD) { if (msgs[i].flags & I2C_M_RD) {
...@@ -235,7 +235,7 @@ static int tm6000_i2c_xfer(struct i2c_adapter *i2c_adap, ...@@ -235,7 +235,7 @@ static int tm6000_i2c_xfer(struct i2c_adapter *i2c_adap,
return num; return num;
err: err:
i2c_dprintk(2," ERROR: %i\n", rc); i2c_dprintk(2, " ERROR: %i\n", rc);
return rc; return rc;
} }
...@@ -266,11 +266,10 @@ static int tm6000_i2c_eeprom(struct tm6000_core *dev, ...@@ -266,11 +266,10 @@ static int tm6000_i2c_eeprom(struct tm6000_core *dev,
if (0 == (i % 16)) if (0 == (i % 16))
printk(KERN_INFO "%s: i2c eeprom %02x:", dev->name, i); printk(KERN_INFO "%s: i2c eeprom %02x:", dev->name, i);
printk(" %02x", eedata[i]); printk(" %02x", eedata[i]);
if ((eedata[i] >= ' ') && (eedata[i] <= 'z')) { if ((eedata[i] >= ' ') && (eedata[i] <= 'z'))
bytes[i%16] = eedata[i]; bytes[i%16] = eedata[i];
} else { else
bytes[i%16]='.'; bytes[i%16] = '.';
}
i++; i++;
...@@ -305,15 +304,15 @@ static u32 functionality(struct i2c_adapter *adap) ...@@ -305,15 +304,15 @@ static u32 functionality(struct i2c_adapter *adap)
} }
#define mass_write(addr, reg, data...) \ #define mass_write(addr, reg, data...) \
{ const static u8 _val[] = data; \ { static const u8 _val[] = data; \
rc=tm6000_read_write_usb(dev,USB_DIR_OUT | USB_TYPE_VENDOR, \ rc = tm6000_read_write_usb(dev, USB_DIR_OUT | USB_TYPE_VENDOR, \
REQ_16_SET_GET_I2C_WR1_RDN,(reg<<8)+addr, 0x00, (u8 *) _val, \ REQ_16_SET_GET_I2C_WR1_RDN, (reg<<8)+addr, 0x00, (u8 *) _val, \
ARRAY_SIZE(_val)); \ ARRAY_SIZE(_val)); \
if (rc<0) { \ if (rc < 0) { \
printk(KERN_ERR "Error on line %d: %d\n",__LINE__,rc); \ printk(KERN_ERR "Error on line %d: %d\n", __LINE__, rc); \
return rc; \ return rc; \
} \ } \
msleep (10); \ msleep(10); \
} }
static struct i2c_algorithm tm6000_algo = { static struct i2c_algorithm tm6000_algo = {
......
...@@ -763,11 +763,11 @@ static struct tm6000_std_settings svideo_stds[] = { ...@@ -763,11 +763,11 @@ static struct tm6000_std_settings svideo_stds[] = {
void tm6000_get_std_res(struct tm6000_core *dev) void tm6000_get_std_res(struct tm6000_core *dev)
{ {
/* Currently, those are the only supported resoltions */ /* Currently, those are the only supported resoltions */
if (dev->norm & V4L2_STD_525_60) { if (dev->norm & V4L2_STD_525_60)
dev->height = 480; dev->height = 480;
} else { else
dev->height = 576; dev->height = 576;
}
dev->width = 720; dev->width = 720;
} }
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
// Use the tm6000-hack, instead of the proper initialization code /* Use the tm6000-hack, instead of the proper initialization code i*/
//#define HACK 1 /* #define HACK 1 */
#include <linux/videodev2.h> #include <linux/videodev2.h>
#include <media/v4l2-common.h> #include <media/v4l2-common.h>
...@@ -98,7 +98,7 @@ enum tm6000_io_method { ...@@ -98,7 +98,7 @@ enum tm6000_io_method {
}; };
enum tm6000_mode { enum tm6000_mode {
TM6000_MODE_UNKNOWN=0, TM6000_MODE_UNKNOWN = 0,
TM6000_MODE_ANALOG, TM6000_MODE_ANALOG,
TM6000_MODE_DIGITAL, TM6000_MODE_DIGITAL,
}; };
...@@ -128,7 +128,7 @@ struct tm6000_dvb { ...@@ -128,7 +128,7 @@ struct tm6000_dvb {
struct dvb_frontend *frontend; struct dvb_frontend *frontend;
struct dmxdev dmxdev; struct dmxdev dmxdev;
unsigned int streams; unsigned int streams;
struct urb *bulk_urb; struct urb *bulk_urb;
struct mutex mutex; struct mutex mutex;
}; };
...@@ -159,7 +159,7 @@ struct tm6000_core { ...@@ -159,7 +159,7 @@ struct tm6000_core {
enum tm6000_devtype dev_type; /* type of device */ enum tm6000_devtype dev_type; /* type of device */
v4l2_std_id norm; /* Current norm */ v4l2_std_id norm; /* Current norm */
int width,height; /* Selected resolution */ int width, height; /* Selected resolution */
enum tm6000_core_state state; enum tm6000_core_state state;
...@@ -238,7 +238,7 @@ struct tm6000_fh { ...@@ -238,7 +238,7 @@ struct tm6000_fh {
/* video capture */ /* video capture */
struct tm6000_fmt *fmt; struct tm6000_fmt *fmt;
unsigned int width,height; unsigned int width, height;
struct videobuf_queue vb_vidq; struct videobuf_queue vb_vidq;
enum v4l2_buf_type type; enum v4l2_buf_type type;
...@@ -250,25 +250,24 @@ struct tm6000_fh { ...@@ -250,25 +250,24 @@ struct tm6000_fh {
/* In tm6000-cards.c */ /* In tm6000-cards.c */
int tm6000_tuner_callback (void *ptr, int component, int command, int arg); int tm6000_tuner_callback(void *ptr, int component, int command, int arg);
int tm6000_xc5000_callback (void *ptr, int component, int command, int arg); int tm6000_xc5000_callback(void *ptr, int component, int command, int arg);
int tm6000_cards_setup(struct tm6000_core *dev); int tm6000_cards_setup(struct tm6000_core *dev);
/* In tm6000-core.c */ /* In tm6000-core.c */
int tm6000_read_write_usb (struct tm6000_core *dev, u8 reqtype, u8 req, int tm6000_read_write_usb(struct tm6000_core *dev, u8 reqtype, u8 req,
u16 value, u16 index, u8 *buf, u16 len); u16 value, u16 index, u8 *buf, u16 len);
int tm6000_get_reg (struct tm6000_core *dev, u8 req, u16 value, u16 index); int tm6000_get_reg(struct tm6000_core *dev, u8 req, u16 value, u16 index);
int tm6000_get_reg16(struct tm6000_core *dev, u8 req, u16 value, u16 index); int tm6000_get_reg16(struct tm6000_core *dev, u8 req, u16 value, u16 index);
int tm6000_get_reg32(struct tm6000_core *dev, u8 req, u16 value, u16 index); int tm6000_get_reg32(struct tm6000_core *dev, u8 req, u16 value, u16 index);
int tm6000_set_reg (struct tm6000_core *dev, u8 req, u16 value, u16 index); int tm6000_set_reg(struct tm6000_core *dev, u8 req, u16 value, u16 index);
int tm6000_i2c_reset(struct tm6000_core *dev, u16 tsleep); int tm6000_i2c_reset(struct tm6000_core *dev, u16 tsleep);
int tm6000_init(struct tm6000_core *dev);
int tm6000_init (struct tm6000_core *dev); int tm6000_init_analog_mode(struct tm6000_core *dev);
int tm6000_init_digital_mode(struct tm6000_core *dev);
int tm6000_init_analog_mode (struct tm6000_core *dev); int tm6000_set_audio_bitrate(struct tm6000_core *dev, int bitrate);
int tm6000_init_digital_mode (struct tm6000_core *dev);
int tm6000_set_audio_bitrate (struct tm6000_core *dev, int bitrate);
int tm6000_v4l2_register(struct tm6000_core *dev); int tm6000_v4l2_register(struct tm6000_core *dev);
int tm6000_v4l2_unregister(struct tm6000_core *dev); int tm6000_v4l2_unregister(struct tm6000_core *dev);
...@@ -284,7 +283,7 @@ void tm6000_close_extension(struct tm6000_core *dev); ...@@ -284,7 +283,7 @@ void tm6000_close_extension(struct tm6000_core *dev);
/* In tm6000-stds.c */ /* In tm6000-stds.c */
void tm6000_get_std_res(struct tm6000_core *dev); void tm6000_get_std_res(struct tm6000_core *dev);
int tm6000_set_standard (struct tm6000_core *dev, v4l2_std_id *norm); int tm6000_set_standard(struct tm6000_core *dev, v4l2_std_id *norm);
/* In tm6000-i2c.c */ /* In tm6000-i2c.c */
int tm6000_i2c_register(struct tm6000_core *dev); int tm6000_i2c_register(struct tm6000_core *dev);
...@@ -298,14 +297,14 @@ int tm6000_vidioc_streamon(struct file *file, void *priv, ...@@ -298,14 +297,14 @@ int tm6000_vidioc_streamon(struct file *file, void *priv,
enum v4l2_buf_type i); enum v4l2_buf_type i);
int tm6000_vidioc_streamoff(struct file *file, void *priv, int tm6000_vidioc_streamoff(struct file *file, void *priv,
enum v4l2_buf_type i); enum v4l2_buf_type i);
int tm6000_vidioc_reqbufs (struct file *file, void *priv, int tm6000_vidioc_reqbufs(struct file *file, void *priv,
struct v4l2_requestbuffers *rb); struct v4l2_requestbuffers *rb);
int tm6000_vidioc_querybuf (struct file *file, void *priv, int tm6000_vidioc_querybuf(struct file *file, void *priv,
struct v4l2_buffer *b); struct v4l2_buffer *b);
int tm6000_vidioc_qbuf (struct file *file, void *priv, struct v4l2_buffer *b); int tm6000_vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *b);
int tm6000_vidioc_dqbuf (struct file *file, void *priv, struct v4l2_buffer *b); int tm6000_vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *b);
ssize_t tm6000_v4l2_read(struct file *filp, char __user * buf, size_t count, ssize_t tm6000_v4l2_read(struct file *filp, char __user * buf, size_t count,
loff_t * f_pos); loff_t *f_pos);
unsigned int tm6000_v4l2_poll(struct file *file, unsigned int tm6000_v4l2_poll(struct file *file,
struct poll_table_struct *wait); struct poll_table_struct *wait);
int tm6000_queue_init(struct tm6000_core *dev); int tm6000_queue_init(struct tm6000_core *dev);
...@@ -320,7 +319,7 @@ extern int tm6000_debug; ...@@ -320,7 +319,7 @@ extern int tm6000_debug;
#define dprintk(dev, level, fmt, arg...) do {\ #define dprintk(dev, level, fmt, arg...) do {\
if (tm6000_debug & level) \ if (tm6000_debug & level) \
printk(KERN_INFO "(%lu) %s %s :"fmt, jiffies, \ printk(KERN_INFO "(%lu) %s %s :"fmt, jiffies, \
dev->name, __FUNCTION__ , ##arg); } while (0) dev->name, __FUNCTION__ , ##arg); } while (0)
#define V4L2_DEBUG_REG 0x0004 #define V4L2_DEBUG_REG 0x0004
...@@ -333,5 +332,3 @@ extern int tm6000_debug; ...@@ -333,5 +332,3 @@ extern int tm6000_debug;
#define tm6000_err(fmt, arg...) do {\ #define tm6000_err(fmt, arg...) do {\
printk(KERN_ERR "tm6000 %s :"fmt, \ printk(KERN_ERR "tm6000 %s :"fmt, \
__FUNCTION__ , ##arg); } while (0) __FUNCTION__ , ##arg); } while (0)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment