Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Example modifications to support request_firmware



Andrew de Quincey wrote:
Hi, this patch is an example of how the changes to support request_firmware might be done. I've only made the neccessary changes to certain example devices. It probably won't compile.

Please let me know what you think.
Hmmm - what exactly is the meaning of this device struct - it's not attached to a device but to the adapter which has no matching device node, not? Am I misunderstanding something?

Holger



------------------------------------------------------------------------

Index: linux/drivers/media/dvb/dvb-core/dvbdev.c
===================================================================
RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/dvb-core/dvbdev.c,v
retrieving revision 1.26
diff -a -u -b -r1.26 dvbdev.c
--- linux/drivers/media/dvb/dvb-core/dvbdev.c 15 Oct 2003 10:58:07 -0000 1.26
+++ linux/drivers/media/dvb/dvb-core/dvbdev.c 28 Jan 2004 16:09:55 -0000
@@ -287,7 +287,7 @@
}
-int dvb_register_adapter(struct dvb_adapter **padap, const char *name)
+int dvb_register_adapter(struct dvb_adapter **padap, const char *name, struct device* device)
{
struct dvb_adapter *adap;
int num;
@@ -321,6 +321,7 @@
#endif
adap->num = num;
adap->name = name;
+ adap->device = device;
list_add_tail (&adap->list_head, &dvb_adapter_list);
Index: linux/drivers/media/dvb/dvb-core/dvbdev.h
===================================================================
RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/dvb-core/dvbdev.h,v
retrieving revision 1.18
diff -a -u -b -r1.18 dvbdev.h
--- linux/drivers/media/dvb/dvb-core/dvbdev.h 14 Oct 2003 08:11:03 -0000 1.18
+++ linux/drivers/media/dvb/dvb-core/dvbdev.h 28 Jan 2004 16:09:55 -0000
@@ -52,6 +52,8 @@
struct list_head device_list;
const char *name;
u8 proposed_mac [6];
+
+ struct device* device;
};
@@ -79,7 +81,7 @@
};
-extern int dvb_register_adapter (struct dvb_adapter **padap, const char *name);
+extern int dvb_register_adapter (struct dvb_adapter **padap, const char *name, struct device* device);
extern int dvb_unregister_adapter (struct dvb_adapter *adap);
extern int dvb_register_device (struct dvb_adapter *adap,
Index: linux/drivers/media/dvb/frontends/tda1004x.c
===================================================================
RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/frontends/tda1004x.c,v
retrieving revision 1.18
diff -a -u -b -r1.18 tda1004x.c
--- linux/drivers/media/dvb/frontends/tda1004x.c 28 Jan 2004 10:19:25 -0000 1.18
+++ linux/drivers/media/dvb/frontends/tda1004x.c 28 Jan 2004 16:09:57 -0000
@@ -1360,6 +1360,7 @@
static u8 td1316_init[] = { 0x0b, 0xf5, 0x85, 0xab };
static u8 td1316_init_tda10046h[] = { 0x0b, 0xf5, 0x80, 0xab };
int status;
+ struct firmware firmware;
dprintk("%s\n", __FUNCTION__);
@@ -1444,6 +1445,10 @@
tda_state.tuner_type = tuner_type;
tda_state.initialised = 0;
+ // load the firmware
+ request_firmware(&firmware, "tda1004x", i2c->adapter->device);
+ // firmware is then used later instead of loading from a file.
+ // upload firmware
if ((status = tda1004x_fwupload(i2c, &tda_state)) != 0) return status;
Index: linux/drivers/media/dvb/ttpci/budget-core.c
===================================================================
RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/ttpci/budget-core.c,v
retrieving revision 1.10
diff -a -u -b -r1.10 budget-core.c
--- linux/drivers/media/dvb/ttpci/budget-core.c 19 Sep 2003 17:23:40 -0000 1.10
+++ linux/drivers/media/dvb/ttpci/budget-core.c 28 Jan 2004 16:09:57 -0000
@@ -208,7 +208,7 @@
budget->card = bi;
budget->dev = (struct saa7146_dev *) dev;
- dvb_register_adapter(&budget->dvb_adapter, budget->card->name);
+ dvb_register_adapter(&budget->dvb_adapter, budget->card->name, &dev->pci->dev);
/* set dd1 stream a & b */
saa7146_write(dev, DD1_STREAM_B, 0x00000000);



--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index