summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorJohannes Stezenbach <devnull@localhost>2004-12-04 19:41:29 +0000
committerJohannes Stezenbach <devnull@localhost>2004-12-04 19:41:29 +0000
commit59ec8c88420407e286ea2a86bb5c934ae6621569 (patch)
tree66421f770224481a00a8e305038994c223b56941 /linux/drivers/media
parent65bbf0e648291aa79c956b9b38adc0627c9759dd (diff)
downloadmediapointer-dvb-s2-59ec8c88420407e286ea2a86bb5c934ae6621569.tar.gz
mediapointer-dvb-s2-59ec8c88420407e286ea2a86bb5c934ae6621569.tar.bz2
misc. white space and coding style cleanup (no functional change)
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c111
1 files changed, 59 insertions, 52 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index 7e75f69c4..aa08a673a 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -141,7 +141,7 @@ static DECLARE_MUTEX(frontend_mutex);
* should make it still possible to receive the requested transponder
* on both tuners...
*/
-static void dvb_bend_frequency (struct dvb_frontend_data *this_fe, int recursive)
+static void dvb_bend_frequency(struct dvb_frontend_data *this_fe, int recursive)
{
struct list_head *entry;
int stepsize = this_fe->frontend->ops->info.frequency_stepsize;
@@ -197,7 +197,7 @@ done:
up (&frontend_mutex);
}
-static void dvb_frontend_add_event (struct dvb_frontend_data *fe, fe_status_t status)
+static void dvb_frontend_add_event(struct dvb_frontend_data *fe, fe_status_t status)
{
struct dvb_fe_events *events = &fe->events;
struct dvb_frontend_event *e;
@@ -220,8 +220,8 @@ static void dvb_frontend_add_event (struct dvb_frontend_data *fe, fe_status_t st
memcpy (&e->parameters, &fe->parameters,
sizeof (struct dvb_frontend_parameters));
- if (status & FE_HAS_LOCK)
- if (fe->frontend->ops->get_frontend) fe->frontend->ops->get_frontend(fe->frontend, &e->parameters);
+ if ((status & FE_HAS_LOCK) && (fe->frontend->ops->get_frontend))
+ fe->frontend->ops->get_frontend(fe->frontend, &e->parameters);
events->eventw = wp;
@@ -233,8 +233,8 @@ static void dvb_frontend_add_event (struct dvb_frontend_data *fe, fe_status_t st
}
-static int dvb_frontend_get_event (struct dvb_frontend_data *fe,
- struct dvb_frontend_event *event, int flags)
+static int dvb_frontend_get_event(struct dvb_frontend_data *fe,
+ struct dvb_frontend_event *event, int flags)
{
struct dvb_fe_events *events = &fe->events;
@@ -276,16 +276,17 @@ static int dvb_frontend_get_event (struct dvb_frontend_data *fe,
return 0;
}
-static void dvb_frontend_init (struct dvb_frontend_data *fe)
+static void dvb_frontend_init(struct dvb_frontend_data *fe)
{
- dprintk ("DVB: initialising frontend %i (%s)...\n",
- fe->frontend->dvb->num,
- fe->frontend->ops->info.name);
+ dprintk("DVB: initialising frontend %i (%s)...\n",
+ fe->frontend->dvb->num,
+ fe->frontend->ops->info.name);
- if (fe->frontend->ops->init) fe->frontend->ops->init(fe->frontend);
+ if (fe->frontend->ops->init)
+ fe->frontend->ops->init(fe->frontend);
}
-static void update_delay (int *quality, int *delay, int min_delay, int locked)
+static void update_delay(int *quality, int *delay, int min_delay, int locked)
{
int q2;
@@ -389,8 +390,10 @@ static int dvb_frontend_autotune(struct dvb_frontend_data *fe, int check_wrapped
/* set the frontend itself */
fe->parameters.frequency += fe->lnb_drift + fe->bending;
- if (autoinversion) fe->parameters.inversion = fe->inversion;
- if (fe->frontend->ops->set_frontend) fe->frontend->ops->set_frontend(fe->frontend, &fe->parameters);
+ if (autoinversion)
+ fe->parameters.inversion = fe->inversion;
+ if (fe->frontend->ops->set_frontend)
+ fe->frontend->ops->set_frontend(fe->frontend, &fe->parameters);
fe->parameters.frequency = original_frequency;
fe->parameters.inversion = original_inversion;
@@ -400,7 +403,7 @@ static int dvb_frontend_autotune(struct dvb_frontend_data *fe, int check_wrapped
-static int dvb_frontend_is_exiting (struct dvb_frontend_data *fe)
+static int dvb_frontend_is_exiting(struct dvb_frontend_data *fe)
{
if (fe->exit)
return 1;
@@ -412,7 +415,7 @@ static int dvb_frontend_is_exiting (struct dvb_frontend_data *fe)
return 0;
}
-static int dvb_frontend_should_wakeup (struct dvb_frontend_data *fe)
+static int dvb_frontend_should_wakeup(struct dvb_frontend_data *fe)
{
if (fe->wakeup) {
fe->wakeup = 0;
@@ -421,7 +424,7 @@ static int dvb_frontend_should_wakeup (struct dvb_frontend_data *fe)
return dvb_frontend_is_exiting(fe);
}
-static void dvb_frontend_wakeup (struct dvb_frontend_data *fe) {
+static void dvb_frontend_wakeup(struct dvb_frontend_data *fe) {
fe->wakeup = 1;
wake_up_interruptible(&fe->wait_queue);
}
@@ -429,7 +432,7 @@ static void dvb_frontend_wakeup (struct dvb_frontend_data *fe) {
/*
* FIXME: use linux/kthread.h
*/
-static int dvb_frontend_thread (void *data)
+static int dvb_frontend_thread(void *data)
{
struct dvb_frontend_data *fe = (struct dvb_frontend_data *) data;
unsigned long timeout;
@@ -438,25 +441,26 @@ static int dvb_frontend_thread (void *data)
fe_status_t s;
int check_wrapped = 0;
- dprintk ("%s\n", __FUNCTION__);
+ dprintk("%s\n", __FUNCTION__);
- snprintf (name, sizeof(name), "kdvb-fe-%i",
- fe->frontend->dvb->num);
+ snprintf(name, sizeof(name), "kdvb-fe-%i", fe->frontend->dvb->num);
- lock_kernel ();
- daemonize (name);
- sigfillset (&current->blocked);
- unlock_kernel ();
+ lock_kernel();
+ daemonize(name);
+ sigfillset(&current->blocked);
+ unlock_kernel();
fe->status = 0;
- dvb_frontend_init (fe);
+ dvb_frontend_init(fe);
fe->wakeup = 0;
while (1) {
- up (&fe->sem); /* is locked when we enter the thread... */
+ up(&fe->sem); /* is locked when we enter the thread... */
- timeout = wait_event_interruptible_timeout(fe->wait_queue,0 != dvb_frontend_should_wakeup (fe), delay);
- if (0 != dvb_frontend_is_exiting (fe)) {
+ timeout = wait_event_interruptible_timeout(fe->wait_queue,
+ dvb_frontend_should_wakeup(fe),
+ delay);
+ if (0 != dvb_frontend_is_exiting(fe)) {
/* got signal or quitting */
break;
}
@@ -464,7 +468,7 @@ static int dvb_frontend_thread (void *data)
if (current->flags & PF_FREEZE)
refrigerator(PF_FREEZE);
- if (down_interruptible (&fe->sem))
+ if (down_interruptible(&fe->sem))
break;
/* if we've got no parameters, just keep idling */
@@ -478,9 +482,10 @@ static int dvb_frontend_thread (void *data)
if (fe->state & FESTATE_RETUNE) {
s = 0;
} else {
- if (fe->frontend->ops->read_status) fe->frontend->ops->read_status(fe->frontend, &s);
+ if (fe->frontend->ops->read_status)
+ fe->frontend->ops->read_status(fe->frontend, &s);
if (s != fe->status) {
- dvb_frontend_add_event (fe, s);
+ dvb_frontend_add_event(fe, s);
fe->status = s;
}
}
@@ -572,12 +577,14 @@ static int dvb_frontend_thread (void *data)
* state until we get a lock */
dvb_frontend_autotune(fe, 0);
}
- };
+ }
if (dvb_shutdown_timeout) {
- if (dvb_powerdown_on_sleep)
- if (fe->frontend->ops->set_voltage) fe->frontend->ops->set_voltage(fe->frontend, SEC_VOLTAGE_OFF);
- if (fe->frontend->ops->sleep) fe->frontend->ops->sleep(fe->frontend);
+ if (dvb_powerdown_on_sleep)
+ if (fe->frontend->ops->set_voltage)
+ fe->frontend->ops->set_voltage(fe->frontend, SEC_VOLTAGE_OFF);
+ if (fe->frontend->ops->sleep)
+ fe->frontend->ops->sleep(fe->frontend);
}
fe->thread_pid = 0;
@@ -588,7 +595,7 @@ static int dvb_frontend_thread (void *data)
}
-static void dvb_frontend_stop (struct dvb_frontend_data *fe)
+static void dvb_frontend_stop(struct dvb_frontend_data *fe)
{
unsigned long ret;
@@ -627,7 +634,7 @@ static void dvb_frontend_stop (struct dvb_frontend_data *fe)
}
-static int dvb_frontend_start (struct dvb_frontend_data *fe)
+static int dvb_frontend_start(struct dvb_frontend_data *fe)
{
int ret;
@@ -663,8 +670,8 @@ static int dvb_frontend_start (struct dvb_frontend_data *fe)
}
-static int dvb_frontend_ioctl (struct inode *inode, struct file *file,
- unsigned int cmd, void *parg)
+static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, void *parg)
{
struct dvb_device *dvbdev = file->private_data;
struct dvb_frontend_data *fe = dvbdev->priv;
@@ -694,7 +701,7 @@ static int dvb_frontend_ioctl (struct inode *inode, struct file *file,
err = 0;
break;
}
-
+
case FE_READ_STATUS:
if (fe->frontend->ops->read_status)
err = fe->frontend->ops->read_status(fe->frontend, (fe_status_t*) parg);
@@ -720,7 +727,7 @@ static int dvb_frontend_ioctl (struct inode *inode, struct file *file,
err = fe->frontend->ops->read_ucblocks(fe->frontend, (__u32*) parg);
break;
-
+
case FE_DISEQC_RESET_OVERLOAD:
if (fe->frontend->ops->diseqc_reset_overload) {
err = fe->frontend->ops->diseqc_reset_overload(fe->frontend);
@@ -773,7 +780,7 @@ static int dvb_frontend_ioctl (struct inode *inode, struct file *file,
if (fe->frontend->ops->diseqc_recv_slave_reply)
err = fe->frontend->ops->diseqc_recv_slave_reply(fe->frontend, (struct dvb_diseqc_slave_reply*) parg);
break;
-
+
case FE_ENABLE_HIGH_LNB_VOLTAGE:
if (fe->frontend->ops->enable_high_lnb_voltage);
err = fe->frontend->ops->enable_high_lnb_voltage(fe->frontend, (int) parg);
@@ -803,7 +810,8 @@ static int dvb_frontend_ioctl (struct inode *inode, struct file *file,
}
/* get frontend-specific tuning settings */
- if (fe->frontend->ops->get_tune_settings && (fe->frontend->ops->get_tune_settings(fe->frontend, &fetunesettings) == 0)) {
+ if (fe->frontend->ops->get_tune_settings &&
+ (fe->frontend->ops->get_tune_settings(fe->frontend, &fetunesettings) == 0)) {
fe->min_delay = (fetunesettings.min_delay_ms * HZ) / 1000;
fe->max_drift = fetunesettings.max_drift;
fe->step_size = fetunesettings.step_size;
@@ -832,13 +840,12 @@ static int dvb_frontend_ioctl (struct inode *inode, struct file *file,
break;
}
}
- if (dvb_override_tune_delay > 0) {
- fe->min_delay = (dvb_override_tune_delay * HZ) / 1000;
- }
+ if (dvb_override_tune_delay > 0)
+ fe->min_delay = (dvb_override_tune_delay * HZ) / 1000;
fe->state = FESTATE_RETUNE;
dvb_frontend_wakeup(fe);
- dvb_frontend_add_event (fe, 0);
+ dvb_frontend_add_event(fe, 0);
fe->status = 0;
err = 0;
break;
@@ -861,7 +868,7 @@ static int dvb_frontend_ioctl (struct inode *inode, struct file *file,
}
-static unsigned int dvb_frontend_poll (struct file *file, struct poll_table_struct *wait)
+static unsigned int dvb_frontend_poll(struct file *file, struct poll_table_struct *wait)
{
struct dvb_device *dvbdev = file->private_data;
struct dvb_frontend_data *fe = dvbdev->priv;
@@ -877,7 +884,7 @@ static unsigned int dvb_frontend_poll (struct file *file, struct poll_table_stru
}
-static int dvb_frontend_open (struct inode *inode, struct file *file)
+static int dvb_frontend_open(struct inode *inode, struct file *file)
{
struct dvb_device *dvbdev = file->private_data;
struct dvb_frontend_data *fe = dvbdev->priv;
@@ -901,7 +908,7 @@ static int dvb_frontend_open (struct inode *inode, struct file *file)
}
-static int dvb_frontend_release (struct inode *inode, struct file *file)
+static int dvb_frontend_release(struct inode *inode, struct file *file)
{
struct dvb_device *dvbdev = file->private_data;
struct dvb_frontend_data *fe = dvbdev->priv;
@@ -977,7 +984,7 @@ int dvb_register_frontend(struct dvb_adapter* dvb,
}
EXPORT_SYMBOL(dvb_register_frontend);
-int dvb_unregister_frontend (struct dvb_frontend* frontend)
+int dvb_unregister_frontend(struct dvb_frontend* frontend)
{
struct list_head *entry, *n;