]> err.no Git - linux-2.6/blobdiff - drivers/media/dvb/ttpci/av7110.c
Merge branch 'x86/gart' into x86/core
[linux-2.6] / drivers / media / dvb / ttpci / av7110.c
index 78919b9e14dccd4b493093c8f4c78fd257827345..f05d43d8b5cf25cfef2bdc0e866c97080ffca257 100644 (file)
@@ -51,6 +51,7 @@
 #include <linux/crc32.h>
 #include <linux/i2c.h>
 #include <linux/kthread.h>
+#include <asm/unaligned.h>
 
 #include <asm/system.h>
 
@@ -112,6 +113,8 @@ MODULE_PARM_DESC(wss_cfg_16_9, "WSS 16:9 - default 0x0007 - bit 15: disable, 14:
 module_param(tv_standard, int, 0444);
 MODULE_PARM_DESC(tv_standard, "TV standard: 0 PAL (default), 1 NTSC");
 
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 static void restart_feeds(struct av7110 *av7110);
 
 static int av7110_num;
@@ -1459,9 +1462,9 @@ static int check_firmware(struct av7110* av7110)
        ptr += 4;
 
        /* check dpram file */
-       crc = ntohl(*(u32*) ptr);
+       crc = get_unaligned_be32(ptr);
        ptr += 4;
-       len = ntohl(*(u32*) ptr);
+       len = get_unaligned_be32(ptr);
        ptr += 4;
        if (len >= 512) {
                printk("dvb-ttpci: dpram file is way too big.\n");
@@ -1476,9 +1479,9 @@ static int check_firmware(struct av7110* av7110)
        ptr += len;
 
        /* check root file */
-       crc = ntohl(*(u32*) ptr);
+       crc = get_unaligned_be32(ptr);
        ptr += 4;
-       len = ntohl(*(u32*) ptr);
+       len = get_unaligned_be32(ptr);
        ptr += 4;
 
        if (len <= 200000 || len >= 300000 ||
@@ -2461,7 +2464,7 @@ static int __devinit av7110_attach(struct saa7146_dev* dev,
                goto err_kfree_0;
 
        ret = dvb_register_adapter(&av7110->dvb_adapter, av7110->card_name,
-                                  THIS_MODULE, &dev->pci->dev);
+                                  THIS_MODULE, &dev->pci->dev, adapter_nr);
        if (ret < 0)
                goto err_put_firmware_1;