Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] ad1848 section fix

WARNING: sound/oss/ad1848.o - Section mismatch: reference to .init.data:ad1848_isapnp_list from .text between 'ad1848_init_generic' (at offset 0x46f0) and 'kmalloc'
WARNING: sound/oss/ad1848.o - Section mismatch: reference to .init.data:ad1848_isapnp_list from .text between 'ad1848_init_generic' (at offset 0x46f8) and 'kmalloc'
WARNING: sound/oss/ad1848.o - Section mismatch: reference to .init.data:ad1848_isapnp_list from .text between 'ad1848_init_generic' (at offset 0x4818) and 'kmalloc'

Also,

sound/oss/ad1848.c: In function `ad1848_init':
sound/oss/ad1848.c:2029: warning: cast to pointer from integer of different size
sound/oss/ad1848.c: In function `ad1848_unload':
sound/oss/ad1848.c:2178: warning: cast to pointer from integer of different size
sound/oss/ad1848.c: In function `adintr':
sound/oss/ad1848.c:2207: warning: cast from pointer to integer of different size

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Andrew Morton and committed by
Linus Torvalds
b307e854 db314194

+6 -4
+6 -4
sound/oss/ad1848.c
··· 2026 2026 if (irq > 0) 2027 2027 { 2028 2028 devc->dev_no = my_dev; 2029 - if (request_irq(devc->irq, adintr, 0, devc->name, (void *)my_dev) < 0) 2029 + if (request_irq(devc->irq, adintr, 0, devc->name, 2030 + (void *)(long)my_dev) < 0) 2030 2031 { 2031 2032 printk(KERN_WARNING "ad1848: Unable to allocate IRQ\n"); 2032 2033 /* Don't free it either then.. */ ··· 2176 2175 if (!share_dma) 2177 2176 { 2178 2177 if (devc->irq > 0) /* There is no point in freeing irq, if it wasn't allocated */ 2179 - free_irq(devc->irq, (void *)devc->dev_no); 2178 + free_irq(devc->irq, (void *)(long)devc->dev_no); 2180 2179 2181 2180 sound_free_dma(dma_playback); 2182 2181 ··· 2205 2204 unsigned char c930_stat = 0; 2206 2205 int cnt = 0; 2207 2206 2208 - dev = (int)dev_id; 2207 + dev = (long)dev_id; 2209 2208 devc = (ad1848_info *) audio_devs[dev]->devc; 2210 2209 2211 2210 interrupt_again: /* Jump back here if int status doesn't reset */ ··· 2901 2900 return(dev); 2902 2901 } 2903 2902 2904 - static struct pnp_dev *ad1848_init_generic(struct pnp_card *bus, struct address_info *hw_config, int slot) 2903 + static struct pnp_dev __init *ad1848_init_generic(struct pnp_card *bus, 2904 + struct address_info *hw_config, int slot) 2905 2905 { 2906 2906 2907 2907 /* Configure Audio device */