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;
......
...@@ -32,66 +32,64 @@ ...@@ -32,66 +32,64 @@
#define USB_TIMEOUT 5*HZ /* ms */ #define USB_TIMEOUT 5*HZ /* ms */
int tm6000_read_write_usb (struct tm6000_core *dev, u8 req_type, u8 req, int tm6000_read_write_usb(struct tm6000_core *dev, u8 req_type, u8 req,
u16 value, u16 index, u8 *buf, u16 len) u16 value, u16 index, u8 *buf, u16 len)
{ {
int ret, i; int ret, i;
unsigned int pipe; unsigned int pipe;
static int ini=0, last=0, n=0; static int ini = 0, last = 0, n = 0;
u8 *data=NULL; u8 *data = NULL;
if (len) if (len)
data = kzalloc(len, GFP_KERNEL); data = kzalloc(len, GFP_KERNEL);
if (req_type & USB_DIR_IN) if (req_type & USB_DIR_IN)
pipe=usb_rcvctrlpipe(dev->udev, 0); pipe = usb_rcvctrlpipe(dev->udev, 0);
else { else {
pipe=usb_sndctrlpipe(dev->udev, 0); pipe = usb_sndctrlpipe(dev->udev, 0);
memcpy(data, buf, len); memcpy(data, buf, len);
} }
if (tm6000_debug & V4L2_DEBUG_I2C) { if (tm6000_debug & V4L2_DEBUG_I2C) {
if (!ini) if (!ini)
last=ini=jiffies; last = ini = jiffies;
printk("%06i (dev %p, pipe %08x): ", n, dev->udev, pipe); printk("%06i (dev %p, pipe %08x): ", n, dev->udev, pipe);
printk( "%s: %06u ms %06u ms %02x %02x %02x %02x %02x %02x %02x %02x ", printk("%s: %06u ms %06u ms %02x %02x %02x %02x %02x %02x %02x %02x ",
(req_type & USB_DIR_IN)?" IN":"OUT", (req_type & USB_DIR_IN) ? " IN" : "OUT",
jiffies_to_msecs(jiffies-last), jiffies_to_msecs(jiffies-last),
jiffies_to_msecs(jiffies-ini), jiffies_to_msecs(jiffies-ini),
req_type, req,value&0xff,value>>8, index&0xff, index>>8, req_type, req, value&0xff, value>>8, index&0xff,
len&0xff, len>>8); index>>8, len&0xff, len>>8);
last=jiffies; last = jiffies;
n++; n++;
if ( !(req_type & USB_DIR_IN) ) { if (!(req_type & USB_DIR_IN)) {
printk(">>> "); printk(">>> ");
for (i=0;i<len;i++) { for (i = 0; i < len; i++)
printk(" %02x",buf[i]); printk(" %02x", buf[i]);
}
printk("\n"); printk("\n");
} }
} }
ret = usb_control_msg(dev->udev, pipe, req, req_type, value, index, data, ret = usb_control_msg(dev->udev, pipe, req, req_type, value, index,
len, USB_TIMEOUT); data, len, USB_TIMEOUT);
if (req_type & USB_DIR_IN) if (req_type & USB_DIR_IN)
memcpy(buf, data, len); memcpy(buf, data, len);
if (tm6000_debug & V4L2_DEBUG_I2C) { if (tm6000_debug & V4L2_DEBUG_I2C) {
if (ret<0) { if (ret < 0) {
if (req_type & USB_DIR_IN) if (req_type & USB_DIR_IN)
printk("<<< (len=%d)\n",len); printk("<<< (len=%d)\n", len);
printk("%s: Error #%d\n", __FUNCTION__, ret); printk("%s: Error #%d\n", __FUNCTION__, ret);
} else if (req_type & USB_DIR_IN) { } else if (req_type & USB_DIR_IN) {
printk("<<< "); printk("<<< ");
for (i=0;i<len;i++) { for (i = 0; i < len; i++)
printk(" %02x",buf[i]); printk(" %02x", buf[i]);
}
printk("\n"); printk("\n");
} }
} }
...@@ -103,52 +101,52 @@ int tm6000_read_write_usb (struct tm6000_core *dev, u8 req_type, u8 req, ...@@ -103,52 +101,52 @@ int tm6000_read_write_usb (struct tm6000_core *dev, u8 req_type, u8 req,
return ret; return ret;
} }
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)
{ {
return return
tm6000_read_write_usb (dev, USB_DIR_OUT | USB_TYPE_VENDOR, tm6000_read_write_usb(dev, USB_DIR_OUT | USB_TYPE_VENDOR,
req, value, index, NULL, 0); req, value, index, NULL, 0);
} }
EXPORT_SYMBOL_GPL(tm6000_set_reg); EXPORT_SYMBOL_GPL(tm6000_set_reg);
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 rc; int rc;
u8 buf[1]; u8 buf[1];
rc=tm6000_read_write_usb (dev, USB_DIR_IN | USB_TYPE_VENDOR, req, rc = tm6000_read_write_usb(dev, USB_DIR_IN | USB_TYPE_VENDOR, req,
value, index, buf, 1); value, index, buf, 1);
if (rc<0) if (rc < 0)
return rc; return rc;
return *buf; return *buf;
} }
EXPORT_SYMBOL_GPL(tm6000_get_reg); EXPORT_SYMBOL_GPL(tm6000_get_reg);
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 rc; int rc;
u8 buf[2]; u8 buf[2];
rc=tm6000_read_write_usb (dev, USB_DIR_IN | USB_TYPE_VENDOR, req, rc = tm6000_read_write_usb(dev, USB_DIR_IN | USB_TYPE_VENDOR, req,
value, index, buf, 2); value, index, buf, 2);
if (rc<0) if (rc < 0)
return rc; return rc;
return buf[1]|buf[0]<<8; return buf[1]|buf[0]<<8;
} }
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 rc; int rc;
u8 buf[4]; u8 buf[4];
rc=tm6000_read_write_usb (dev, USB_DIR_IN | USB_TYPE_VENDOR, req, rc = tm6000_read_write_usb(dev, USB_DIR_IN | USB_TYPE_VENDOR, req,
value, index, buf, 4); value, index, buf, 4);
if (rc<0) if (rc < 0)
return rc; return rc;
return buf[3] | buf[2] << 8 | buf[1] << 16 | buf[0] << 24; return buf[3] | buf[2] << 8 | buf[1] << 16 | buf[0] << 24;
...@@ -188,7 +186,7 @@ void tm6000_set_fourcc_format(struct tm6000_core *dev) ...@@ -188,7 +186,7 @@ void tm6000_set_fourcc_format(struct tm6000_core *dev)
} }
} }
int tm6000_init_analog_mode (struct tm6000_core *dev) int tm6000_init_analog_mode(struct tm6000_core *dev)
{ {
if (dev->dev_type == TM6010) { if (dev->dev_type == TM6010) {
int val; int val;
...@@ -294,12 +292,10 @@ int tm6000_init_analog_mode (struct tm6000_core *dev) ...@@ -294,12 +292,10 @@ int tm6000_init_analog_mode (struct tm6000_core *dev)
/* Enables soft reset */ /* Enables soft reset */
tm6000_set_reg(dev, TM6010_REQ07_R3F_RESET, 0x01); tm6000_set_reg(dev, TM6010_REQ07_R3F_RESET, 0x01);
if (dev->scaler) { if (dev->scaler)
tm6000_set_reg(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, 0x20); tm6000_set_reg(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, 0x20);
} else { else /* Enable Hfilter and disable TS Drop err */
/* Enable Hfilter and disable TS Drop err */
tm6000_set_reg(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, 0x80); tm6000_set_reg(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, 0x80);
}
tm6000_set_reg(dev, TM6010_REQ07_RC3_HSTART1, 0x88); tm6000_set_reg(dev, TM6010_REQ07_RC3_HSTART1, 0x88);
tm6000_set_reg(dev, TM6010_REQ07_RD8_IR_WAKEUP_SEL, 0x23); tm6000_set_reg(dev, TM6010_REQ07_RD8_IR_WAKEUP_SEL, 0x23);
...@@ -332,13 +328,13 @@ int tm6000_init_analog_mode (struct tm6000_core *dev) ...@@ -332,13 +328,13 @@ int tm6000_init_analog_mode (struct tm6000_core *dev)
/*FIXME: Hack!!! */ /*FIXME: Hack!!! */
struct v4l2_frequency f; struct v4l2_frequency f;
mutex_lock(&dev->lock); mutex_lock(&dev->lock);
f.frequency=dev->freq; f.frequency = dev->freq;
v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_frequency, &f); v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_frequency, &f);
mutex_unlock(&dev->lock); mutex_unlock(&dev->lock);
msleep(100); msleep(100);
tm6000_set_standard (dev, &dev->norm); tm6000_set_standard(dev, &dev->norm);
tm6000_set_audio_bitrate (dev,48000); tm6000_set_audio_bitrate(dev, 48000);
/* switch dvb led off */ /* switch dvb led off */
if (dev->gpio.dvb_led) { if (dev->gpio.dvb_led) {
...@@ -349,7 +345,7 @@ int tm6000_init_analog_mode (struct tm6000_core *dev) ...@@ -349,7 +345,7 @@ int tm6000_init_analog_mode (struct tm6000_core *dev)
return 0; return 0;
} }
int tm6000_init_digital_mode (struct tm6000_core *dev) int tm6000_init_digital_mode(struct tm6000_core *dev)
{ {
if (dev->dev_type == TM6010) { if (dev->dev_type == TM6010) {
int val; int val;
...@@ -366,10 +362,8 @@ int tm6000_init_digital_mode (struct tm6000_core *dev) ...@@ -366,10 +362,8 @@ int tm6000_init_digital_mode (struct tm6000_core *dev)
tm6000_set_reg(dev, TM6010_REQ08_RE2_POWER_DOWN_CTRL1, 0xfc); tm6000_set_reg(dev, TM6010_REQ08_RE2_POWER_DOWN_CTRL1, 0xfc);
tm6000_set_reg(dev, TM6010_REQ08_RE6_POWER_DOWN_CTRL2, 0xff); tm6000_set_reg(dev, TM6010_REQ08_RE6_POWER_DOWN_CTRL2, 0xff);
tm6000_set_reg(dev, TM6010_REQ08_RF1_AADC_POWER_DOWN, 0xfe); tm6000_set_reg(dev, TM6010_REQ08_RF1_AADC_POWER_DOWN, 0xfe);
tm6000_read_write_usb (dev, 0xc0, 0x0e, 0x00c2, 0x0008, buf, 2); tm6000_read_write_usb(dev, 0xc0, 0x0e, 0x00c2, 0x0008, buf, 2);
printk (KERN_INFO "buf %#x %#x \n", buf[0], buf[1]); printk(KERN_INFO"buf %#x %#x\n", buf[0], buf[1]);
} else { } else {
tm6000_set_reg(dev, TM6010_REQ07_RFF_SOFT_RESET, 0x08); tm6000_set_reg(dev, TM6010_REQ07_RFF_SOFT_RESET, 0x08);
tm6000_set_reg(dev, TM6010_REQ07_RFF_SOFT_RESET, 0x00); tm6000_set_reg(dev, TM6010_REQ07_RFF_SOFT_RESET, 0x00);
...@@ -377,7 +371,7 @@ int tm6000_init_digital_mode (struct tm6000_core *dev) ...@@ -377,7 +371,7 @@ int tm6000_init_digital_mode (struct tm6000_core *dev)
tm6000_set_reg(dev, TM6010_REQ07_RD8_IR_PULSE_CNT0, 0x08); tm6000_set_reg(dev, TM6010_REQ07_RD8_IR_PULSE_CNT0, 0x08);
tm6000_set_reg(dev, TM6010_REQ07_RE2_OUT_SEL2, 0x0c); tm6000_set_reg(dev, TM6010_REQ07_RE2_OUT_SEL2, 0x0c);
tm6000_set_reg(dev, TM6010_REQ07_RE8_TYPESEL_MOS_I2S, 0xff); tm6000_set_reg(dev, TM6010_REQ07_RE8_TYPESEL_MOS_I2S, 0xff);
tm6000_set_reg (dev, REQ_07_SET_GET_AVREG, 0x00eb, 0xd8); tm6000_set_reg(dev, REQ_07_SET_GET_AVREG, 0x00eb, 0xd8);
tm6000_set_reg(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, 0x40); tm6000_set_reg(dev, TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE, 0x40);
tm6000_set_reg(dev, TM6010_REQ07_RC1_TRESHOLD, 0xd0); tm6000_set_reg(dev, TM6010_REQ07_RC1_TRESHOLD, 0xd0);
tm6000_set_reg(dev, TM6010_REQ07_RC3_HSTART1, 0x09); tm6000_set_reg(dev, TM6010_REQ07_RC3_HSTART1, 0x09);
...@@ -388,14 +382,14 @@ int tm6000_init_digital_mode (struct tm6000_core *dev) ...@@ -388,14 +382,14 @@ int tm6000_init_digital_mode (struct tm6000_core *dev)
tm6000_set_reg(dev, TM6010_REQ07_RE2_OUT_SEL2, 0x0c); tm6000_set_reg(dev, TM6010_REQ07_RE2_OUT_SEL2, 0x0c);
tm6000_set_reg(dev, TM6010_REQ07_RE8_TYPESEL_MOS_I2S, 0xff); tm6000_set_reg(dev, TM6010_REQ07_RE8_TYPESEL_MOS_I2S, 0xff);
tm6000_set_reg (dev, REQ_07_SET_GET_AVREG, 0x00eb, 0x08); tm6000_set_reg(dev, REQ_07_SET_GET_AVREG, 0x00eb, 0x08);
msleep(50); msleep(50);
tm6000_set_reg (dev, REQ_04_EN_DISABLE_MCU_INT, 0x0020, 0x00); tm6000_set_reg(dev, REQ_04_EN_DISABLE_MCU_INT, 0x0020, 0x00);
msleep(50); msleep(50);
tm6000_set_reg (dev, REQ_04_EN_DISABLE_MCU_INT, 0x0020, 0x01); tm6000_set_reg(dev, REQ_04_EN_DISABLE_MCU_INT, 0x0020, 0x01);
msleep(50); msleep(50);
tm6000_set_reg (dev, REQ_04_EN_DISABLE_MCU_INT, 0x0020, 0x00); tm6000_set_reg(dev, REQ_04_EN_DISABLE_MCU_INT, 0x0020, 0x00);
msleep(100); msleep(100);
} }
...@@ -567,9 +561,9 @@ struct reg_init tm6010_init_tab[] = { ...@@ -567,9 +561,9 @@ struct reg_init tm6010_init_tab[] = {
{ TM6010_REQ07_RD8_IR_WAKEUP_SEL, 0xff }, { TM6010_REQ07_RD8_IR_WAKEUP_SEL, 0xff },
}; };
int tm6000_init (struct tm6000_core *dev) int tm6000_init(struct tm6000_core *dev)
{ {
int board, rc=0, i, size; int board, rc = 0, i, size;
struct reg_init *tab; struct reg_init *tab;
if (dev->dev_type == TM6010) { if (dev->dev_type == TM6010) {
...@@ -581,12 +575,12 @@ int tm6000_init (struct tm6000_core *dev) ...@@ -581,12 +575,12 @@ int tm6000_init (struct tm6000_core *dev)
} }
/* Load board's initialization table */ /* Load board's initialization table */
for (i=0; i< size; i++) { for (i = 0; i < size; i++) {
rc= tm6000_set_reg (dev, tab[i].req, tab[i].reg, tab[i].val); rc = tm6000_set_reg(dev, tab[i].req, tab[i].reg, tab[i].val);
if (rc<0) { if (rc < 0) {
printk (KERN_ERR "Error %i while setting req %d, " printk(KERN_ERR "Error %i while setting req %d, "
"reg %d to value %d\n", rc, "reg %d to value %d\n", rc,
tab[i].req,tab[i].reg, tab[i].val); tab[i].req, tab[i].reg, tab[i].val);
return rc; return rc;
} }
} }
...@@ -594,12 +588,11 @@ int tm6000_init (struct tm6000_core *dev) ...@@ -594,12 +588,11 @@ int tm6000_init (struct tm6000_core *dev)
msleep(5); /* Just to be conservative */ msleep(5); /* Just to be conservative */
/* Check board version - maybe 10Moons specific */ /* Check board version - maybe 10Moons specific */
board=tm6000_get_reg32 (dev, REQ_40_GET_VERSION, 0, 0); board = tm6000_get_reg32(dev, REQ_40_GET_VERSION, 0, 0);
if (board >=0) { if (board >= 0)
printk (KERN_INFO "Board version = 0x%08x\n",board); printk(KERN_INFO "Board version = 0x%08x\n", board);
} else { else
printk (KERN_ERR "Error %i while retrieving board version\n",board); printk(KERN_ERR "Error %i while retrieving board version\n", board);
}
rc = tm6000_cards_setup(dev); rc = tm6000_cards_setup(dev);
...@@ -610,23 +603,23 @@ int tm6000_set_audio_bitrate(struct tm6000_core *dev, int bitrate) ...@@ -610,23 +603,23 @@ int tm6000_set_audio_bitrate(struct tm6000_core *dev, int bitrate)
{ {
int val; int val;
val=tm6000_get_reg (dev, REQ_07_SET_GET_AVREG, 0xeb, 0x0); val = tm6000_get_reg(dev, REQ_07_SET_GET_AVREG, 0xeb, 0x0);
printk("Original value=%d\n",val); printk("Original value=%d\n", val);
if (val<0) if (val < 0)
return val; return val;
val &= 0x0f; /* Preserve the audio input control bits */ val &= 0x0f; /* Preserve the audio input control bits */
switch (bitrate) { switch (bitrate) {
case 44100: case 44100:
val|=0xd0; val |= 0xd0;
dev->audio_bitrate=bitrate; dev->audio_bitrate = bitrate;
break; break;
case 48000: case 48000:
val|=0x60; val |= 0x60;
dev->audio_bitrate=bitrate; dev->audio_bitrate = bitrate;
break; break;
} }
val=tm6000_set_reg (dev, REQ_07_SET_GET_AVREG, 0xeb, val); val = tm6000_set_reg(dev, REQ_07_SET_GET_AVREG, 0xeb, val);
return val; return val;
} }
......
...@@ -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,7 +258,7 @@ int register_dvb(struct tm6000_core *dev) ...@@ -262,7 +258,7 @@ 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;
} }
...@@ -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,
}; };
...@@ -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);
...@@ -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