]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ALSA] Fix invalid assignment of PCI revision
authorTakashi Iwai <tiwai@suse.de>
Thu, 16 Nov 2006 14:39:07 +0000 (15:39 +0100)
committerJaroslav Kysela <perex@server.perex.cz>
Wed, 20 Dec 2006 07:55:55 +0000 (08:55 +0100)
Fix the type of PCI revision to char from int and avoid invalid
assignment with pointer cast.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
include/sound/ymfpci.h
sound/pci/ca0106/ca0106.h
sound/pci/ca0106/ca0106_main.c
sound/pci/emu10k1/emu10k1x.c
sound/pci/ymfpci/ymfpci_main.c

index a3c5de59a2485384c1c6edea4d31de3e212c117b..f3514ee96bd9753f64782d89fe978e16c8bd8261 100644 (file)
@@ -286,7 +286,7 @@ struct snd_ymfpci {
        int irq;
 
        unsigned int device_id; /* PCI device ID */
-       unsigned int rev;       /* PCI revision */
+       unsigned char rev;      /* PCI revision */
        unsigned long reg_area_phys;
        void __iomem *reg_area_virt;
        struct resource *res_reg_area;
index 9cb66c59f523e50251fe17013f87564347735777..aaac6e5b47676c07f1966a6ce0c709ace94d738f 100644 (file)
@@ -590,7 +590,7 @@ struct snd_ca0106 {
        struct resource *res_port;
        int irq;
 
-       unsigned int revision;          /* chip revision */
+       unsigned char revision;         /* chip revision */
        unsigned int serial;            /* serial number */
        unsigned short model;           /* subsystem id */
 
index 6fa4a302f7de06d7371007b49a8109ea2a2d031b..2adbd003851d460f4e5bcc61c60a9560d0536073 100644 (file)
@@ -1283,7 +1283,7 @@ static int __devinit snd_ca0106_create(struct snd_card *card,
 
        pci_set_master(pci);
        /* read revision & serial */
-       pci_read_config_byte(pci, PCI_REVISION_ID, (char *)&chip->revision);
+       pci_read_config_byte(pci, PCI_REVISION_ID, &chip->revision);
        pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &chip->serial);
        pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &chip->model);
 #if 1
index c46905a111753b3774d487018852af7318856b39..e0724394ed25f6f76faf59c62a61d8b61e7933c8 100644 (file)
@@ -235,7 +235,7 @@ struct emu10k1x {
        struct resource *res_port;
        int irq;
 
-       unsigned int revision;          /* chip revision */
+       unsigned char revision;         /* chip revision */
        unsigned int serial;            /* serial number */
        unsigned short model;           /* subsystem id */
 
@@ -943,7 +943,7 @@ static int __devinit snd_emu10k1x_create(struct snd_card *card,
 
        pci_set_master(pci);
        /* read revision & serial */
-       pci_read_config_byte(pci, PCI_REVISION_ID, (char *)&chip->revision);
+       pci_read_config_byte(pci, PCI_REVISION_ID, &chip->revision);
        pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &chip->serial);
        pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &chip->model);
        snd_printk(KERN_INFO "Model %04x Rev %08x Serial %08x\n", chip->model,
index 16be1f39548477f83a411f2a64161ea9c5b6b1fd..843dcca1d4a5572dcd6422e3fc6098fad33ef978 100644 (file)
@@ -2291,7 +2291,7 @@ int __devinit snd_ymfpci_create(struct snd_card *card,
        chip->pci = pci;
        chip->irq = -1;
        chip->device_id = pci->device;
-       pci_read_config_byte(pci, PCI_REVISION_ID, (u8 *)&chip->rev);
+       pci_read_config_byte(pci, PCI_REVISION_ID, &chip->rev);
        chip->reg_area_phys = pci_resource_start(pci, 0);
        chip->reg_area_virt = ioremap_nocache(chip->reg_area_phys, 0x8000);
        pci_set_master(pci);