Skip to content

Commit

Permalink
[media] staging: as102: Whitespace and indentation cleanup
Browse files Browse the repository at this point in the history
Remove some unnecessary braces. Replace spaces with tabs where
expected. Replace gcc specific __FUNCTION__ with  C99 __func__.
No functional changes.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Sylwester Nawrocki authored and Mauro Carvalho Chehab committed Nov 8, 2011
1 parent 8801028 commit 14e0e4b
Show file tree
Hide file tree
Showing 7 changed files with 493 additions and 495 deletions.
38 changes: 18 additions & 20 deletions drivers/staging/media/as102/as102_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,22 @@ static int as10x_pid_filter(struct as102_dev_t *dev,

switch (onoff) {
case 0:
ret = as10x_cmd_del_PID_filter(bus_adap, (uint16_t) pid);
dprintk(debug, "DEL_PID_FILTER([%02d] 0x%04x) ret = %d\n",
index, pid, ret);
break;
ret = as10x_cmd_del_PID_filter(bus_adap, (uint16_t) pid);
dprintk(debug, "DEL_PID_FILTER([%02d] 0x%04x) ret = %d\n",
index, pid, ret);
break;
case 1:
{
struct as10x_ts_filter filter;
struct as10x_ts_filter filter;

filter.type = TS_PID_TYPE_TS;
filter.idx = 0xFF;
filter.pid = pid;
filter.type = TS_PID_TYPE_TS;
filter.idx = 0xFF;
filter.pid = pid;

ret = as10x_cmd_add_PID_filter(bus_adap, &filter);
dprintk(debug, "ADD_PID_FILTER([%02d -> %02d], 0x%04x) ret = %d\n",
index, filter.idx, filter.pid, ret);
break;
ret = as10x_cmd_add_PID_filter(bus_adap, &filter);
dprintk(debug, "ADD_PID_FILTER([%02d -> %02d], 0x%04x) ret = %d\n",
index, filter.idx, filter.pid, ret);
break;
}
}

Expand All @@ -157,10 +157,9 @@ static int as102_dvb_dmx_start_feed(struct dvb_demux_feed *dvbdmxfeed)
if (mutex_lock_interruptible(&as102_dev->sem))
return -ERESTARTSYS;

if (pid_filtering) {
as10x_pid_filter(as102_dev,
dvbdmxfeed->index, dvbdmxfeed->pid, 1);
}
if (pid_filtering)
as10x_pid_filter(as102_dev, dvbdmxfeed->index,
dvbdmxfeed->pid, 1);

if (as102_dev->streaming++ == 0)
ret = as102_start_stream(as102_dev);
Expand All @@ -183,10 +182,9 @@ static int as102_dvb_dmx_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
if (--as102_dev->streaming == 0)
as102_stop_stream(as102_dev);

if (pid_filtering) {
as10x_pid_filter(as102_dev,
dvbdmxfeed->index, dvbdmxfeed->pid, 0);
}
if (pid_filtering)
as10x_pid_filter(as102_dev, dvbdmxfeed->index,
dvbdmxfeed->pid, 0);

mutex_unlock(&as102_dev->sem);
LEAVE();
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/media/as102/as102_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ extern struct usb_driver as102_usb_driver;

#define dprintk(debug, args...) \
do { if (debug) { \
printk(KERN_DEBUG "%s: ",__FUNCTION__); \
pr_debug("%s: ", __func__); \
printk(args); \
} } while (0)

#ifdef TRACE
#define ENTER() printk(">> enter %s\n", __FUNCTION__)
#define LEAVE() printk("<< leave %s\n", __FUNCTION__)
#define ENTER() pr_debug(">> enter %s\n", __func__)
#define LEAVE() pr_debug("<< leave %s\n", __func__)
#else
#define ENTER()
#define LEAVE()
Expand Down
14 changes: 7 additions & 7 deletions drivers/staging/media/as102/as102_usb_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ static const char *as102_device_names[] = {
};

struct usb_driver as102_usb_driver = {
.name = DRIVER_FULL_NAME,
.probe = as102_usb_probe,
.disconnect = as102_usb_disconnect,
.id_table = as102_usb_id_table
.name = DRIVER_FULL_NAME,
.probe = as102_usb_probe,
.disconnect = as102_usb_disconnect,
.id_table = as102_usb_id_table
};

static const struct file_operations as102_dev_fops = {
.owner = THIS_MODULE,
.open = as102_open,
.release = as102_release,
.owner = THIS_MODULE,
.open = as102_open,
.release = as102_release,
};

static struct usb_class_driver as102_usb_class_driver = {
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/media/as102/as10x_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ int as10x_cmd_get_tune_status(as10x_handle_t *phandle,
}

/**
* send get TPS command to AS10x
* as10x_cmd_get_tps - send get TPS command to AS10x
* @phandle: pointer to AS10x handle
* @ptps: pointer to TPS parameters structure
*
Expand Down
Loading

0 comments on commit 14e0e4b

Please sign in to comment.