X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=sound%2Foss%2Fopl3.c;h=7781c13c147635b53b06756e31b0daae50b583c0;hb=29dd59755a849cc6475faa6a75f3b804e23a6fc2;hp=4799bc77f987223308da7adc3aa22bae581122b7;hpb=97d41e90fe61399b99d74820cb7f2d6e0fbac91d;p=linux-2.6-omap-h63xx.git diff --git a/sound/oss/opl3.c b/sound/oss/opl3.c index 4799bc77f98..7781c13c147 100644 --- a/sound/oss/opl3.c +++ b/sound/oss/opl3.c @@ -34,7 +34,6 @@ #include "sound_config.h" -#include "opl3.h" #include "opl3_hw.h" #define MAX_VOICE 18 @@ -73,7 +72,6 @@ typedef struct opl_devinfo unsigned char cmask; int is_opl4; - int *osp; } opl_devinfo; static struct opl_devinfo *devc = NULL; @@ -144,7 +142,7 @@ static int opl3_ioctl(int dev, unsigned int cmd, void __user * arg) } } -int opl3_detect(int ioaddr, int *osp) +static int opl3_detect(int ioaddr) { /* * This function returns 1 if the FM chip is present at the given I/O port @@ -166,7 +164,7 @@ int opl3_detect(int ioaddr, int *osp) return 0; } - devc = (struct opl_devinfo *)kmalloc(sizeof(*devc), GFP_KERNEL); + devc = kzalloc(sizeof(*devc), GFP_KERNEL); if (devc == NULL) { @@ -175,7 +173,6 @@ int opl3_detect(int ioaddr, int *osp) return 0; } - memset(devc, 0, sizeof(*devc)); strcpy(devc->fm_info.name, "OPL2"); if (!request_region(ioaddr, 4, devc->fm_info.name)) { @@ -183,7 +180,6 @@ int opl3_detect(int ioaddr, int *osp) goto cleanup_devc; } - devc->osp = osp; devc->base = ioaddr; /* Reset timers 1 and 2 */ @@ -1106,7 +1102,7 @@ static struct synth_operations opl3_operations = .setup_voice = opl3_setup_voice }; -int opl3_init(int ioaddr, int *osp, struct module *owner) +static int opl3_init(int ioaddr, struct module *owner) { int i; int me; @@ -1195,9 +1191,6 @@ int opl3_init(int ioaddr, int *osp, struct module *owner) return me; } -EXPORT_SYMBOL(opl3_init); -EXPORT_SYMBOL(opl3_detect); - static int me; static int io = -1; @@ -1210,12 +1203,12 @@ static int __init init_opl3 (void) if (io != -1) /* User loading pure OPL3 module */ { - if (!opl3_detect(io, NULL)) + if (!opl3_detect(io)) { return -ENODEV; } - me = opl3_init(io, NULL, THIS_MODULE); + me = opl3_init(io, THIS_MODULE); } return 0;