summaryrefslogtreecommitdiff
path: root/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2008-05-29 19:50:06 +0300
committerDavid Woodhouse <David.Woodhouse@intel.com>2008-07-10 14:47:53 +0100
commit0a2a736afa91e8a0402c9dbdaf2ee28481a50bd3 (patch)
tree97c3ad0cd3e0f6aaa8360ce8288ab7470e9e572a /drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
parent79682499d9f3eaea4e6a970d8aa0b9bc1ac2a97f (diff)
downloadlinux-rt-0a2a736afa91e8a0402c9dbdaf2ee28481a50bd3.tar.gz
ttusb-budget: use request_firmware()
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c')
-rw-r--r--drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
index 5d2d81ab2371..bc2043e44ebd 100644
--- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -19,6 +19,7 @@
#include <linux/errno.h>
#include <linux/jiffies.h>
#include <linux/mutex.h>
+#include <linux/firmware.h>
#include "dvb_frontend.h"
#include "dmxdev.h"
@@ -285,13 +286,19 @@ static int master_xfer(struct i2c_adapter* adapter, struct i2c_msg *msg, int num
return i;
}
-#include "dvb-ttusb-dspbootcode.h"
-
static int ttusb_boot_dsp(struct ttusb *ttusb)
{
+ const struct firmware *fw;
int i, err;
u8 b[40];
+ err = request_firmware(&fw, "ttusb-budget/dspbootcode.bin",
+ &ttusb->dev->dev);
+ if (err) {
+ printk(KERN_ERR "ttusb-budget: failed to request firmware\n");
+ return err;
+ }
+
/* BootBlock */
b[0] = 0xaa;
b[2] = 0x13;
@@ -299,8 +306,8 @@ static int ttusb_boot_dsp(struct ttusb *ttusb)
/* upload dsp code in 32 byte steps (36 didn't work for me ...) */
/* 32 is max packet size, no messages should be splitted. */
- for (i = 0; i < sizeof(dsp_bootcode); i += 28) {
- memcpy(&b[4], &dsp_bootcode[i], 28);
+ for (i = 0; i < fw->size; i += 28) {
+ memcpy(&b[4], &fw->data[i], 28);
b[1] = ++ttusb->c;
@@ -1820,3 +1827,4 @@ module_exit(ttusb_exit);
MODULE_AUTHOR("Holger Waechtler <holger@convergence.de>");
MODULE_DESCRIPTION("TTUSB DVB Driver");
MODULE_LICENSE("GPL");
+MODULE_FIRMWARE("ttusb-budget/dspbootcode.bin");