[patch 08/10] firedtv: remove unused struct members

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <devel@...>
Date: Monday, September 29, 2008 - 1:21 pm

and redefine an int as a bool.

Signed-off-by: Stefan Richter
---
drivers/media/dvb/firesat/firesat.h | 7 +------
drivers/media/dvb/firesat/firesat_dvb.c | 20 ++++++++------------
2 files changed, 9 insertions(+), 18 deletions(-)

Index: linux/drivers/media/dvb/firesat/firesat.h
===================================================================
--- linux.orig/drivers/media/dvb/firesat/firesat.h
+++ linux/drivers/media/dvb/firesat/firesat.h
@@ -149,13 +149,8 @@ struct firesat {
struct work_struct remote_ctrl_work;

struct firesat_channel {
- struct firesat *firesat;
- struct dvb_demux_feed *dvbdmxfeed;
-
- int active;
- int id;
+ bool active;
int pid;
- int type; /* 1 - TS, 2 - Filter */
} channel[16];
struct mutex demux_mutex;

Index: linux/drivers/media/dvb/firesat/firesat_dvb.c
===================================================================
--- linux.orig/drivers/media/dvb/firesat/firesat_dvb.c
+++ linux/drivers/media/dvb/firesat/firesat_dvb.c
@@ -34,8 +34,8 @@ static struct firesat_channel *firesat_c
return NULL;

for (k = 0; k < 16; k++)
- if (firesat->channel[k].active == 0) {
- firesat->channel[k].active = 1;
+ if (!firesat->channel[k].active) {
+ firesat->channel[k].active = true;
c = &firesat->channel[k];
break;
}
@@ -52,7 +52,7 @@ static int firesat_channel_collect(struc
return -EINTR;

for (k = 0; k < 16; k++)
- if (firesat->channel[k].active == 1)
+ if (firesat->channel[k].active)
pid[l++] = firesat->channel[k].pid;

mutex_unlock(&firesat->demux_mutex);
@@ -68,7 +68,7 @@ static int firesat_channel_release(struc
if (mutex_lock_interruptible(&firesat->demux_mutex))
return -EINTR;

- channel->active = 0;
+ channel->active = false;

mutex_unlock(&firesat->demux_mutex);
return 0;
@@ -102,7 +102,7 @@ int firesat_start_feed(struct dvb_demux_
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
- if(firesat->channel[k].active == 0)
+ if (!firesat->channel[k].active)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
@@ -124,11 +124,7 @@ int firesat_start_feed(struct dvb_demux_
}

dvbdmxfeed->priv = channel;
-
- channel->dvbdmxfeed = dvbdmxfeed;
channel->pid = dvbdmxfeed->pid;
- channel->type = dvbdmxfeed->type;
- channel->firesat = firesat;

if (firesat_channel_collect(firesat, &pidc, pids)) {
firesat_channel_release(firesat, channel);
@@ -191,16 +187,16 @@ int firesat_stop_feed(struct dvb_demux_f

/* list except channel to be removed */
for (k = 0, l = 0; k < 16; k++)
- if (firesat->channel[k].active == 1) {
+ if (firesat->channel[k].active) {
if (&firesat->channel[k] != c)
pids[l++] = firesat->channel[k].pid;
else
- firesat->channel[k].active = 0;
+ firesat->channel[k].active = false;
}

k = AVCTuner_SetPIDs(firesat, l, pids);
if (!k)
- c->active = 0;
+ c->active = false;

mutex_unlock(&firesat->demux_mutex);
return k;

--
Stefan Richter
-=====-==--- =--= ===-=
http://arcgraph.de/sr/

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Gettinng started with Linux drivers, Amit Uttamchandani, (Fri Apr 10, 6:04 pm)
broken mailing list, try 47..., Greg KH, (Fri Jan 11, 3:12 pm)
Mailing Lists, Tomasz Grzegurzko, (Fri Feb 8, 8:22 pm)
what is the status of this initiative ?, JoJo jojo, (Thu Mar 13, 3:20 am)
A tablet driver question, Steven Hunt, (Wed May 20, 12:49 am)
Dearest Beloved,, Mr. Kunio Uematsu, (Tue Mar 16, 3:52 pm)
[patch 00/10] firedtv: a few more updates, Stefan Richter, (Mon Sep 29, 1:15 pm)
Re: A tablet driver question, Greg KH, (Wed May 20, 1:12 am)
Re: A tablet driver question, Steven Hunt, (Wed May 20, 2:16 am)
Re: A tablet driver question, Jiri Slaby, (Wed May 20, 3:19 am)
Re: A tablet driver question, Steven Hunt, (Wed May 20, 11:58 am)
Re: A tablet driver question, Jiri Slaby, (Wed May 20, 12:24 pm)
Re: A tablet driver question, Mohamed Ikbel Boulabiar, (Wed May 20, 12:50 pm)
Re: A tablet driver question, Jiri Kosina, (Thu May 21, 4:33 am)
Re: Gettinng started with Linux drivers, Stefan Richter, (Sat Apr 11, 6:00 am)
Re: Gettinng started with Linux drivers, Amit Uttamchandani, (Sun Apr 12, 9:08 pm)
Re: Gettinng started with Linux drivers, Stefan Richter, (Mon Apr 13, 3:39 am)
Re: [patch 00/10] firedtv: a few more updates, Stefan Richter, (Mon Sep 29, 1:46 pm)
[patch 08/10] firedtv: remove unused struct members, Stefan Richter, (Mon Sep 29, 1:21 pm)
Re: what is the status of this initiative ?, Greg KH, (Thu Mar 13, 10:51 am)
Re: what is the status of this initiative ?, Javi Roman, (Thu Mar 13, 1:13 pm)
Re: what is the status of this initiative ?, Greg KH, (Thu Mar 13, 1:36 pm)
Re: what is the status of this initiative ?, Davide Madrisan, (Thu Mar 13, 1:30 pm)
Re: broken mailing list, try 47..., Steven Le Roux, (Sat Jan 12, 2:10 pm)
Re: broken mailing list, try 47..., stuart, (Sat Jan 12, 6:56 pm)
Kick off the Linux Driver Project (again, this time for real), Peter W. Morreale, (Thu Sep 27, 9:21 am)
Kick off the Linux Driver Project (again, this time for real), Peter W. Morreale, (Thu Sep 27, 9:55 am)
Kick off the Linux Driver Project (again, this time for real), Peter W. Morreale, (Thu Sep 27, 10:58 am)
Kick off the Linux Driver Project (again, this time for real), Tomasz Grzegurzko, (Thu Sep 27, 9:40 pm)