From 04b6389a5e236a0d214503e922f1e87ccb97f79d Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Wed, 1 Jun 2005 02:38:33 -0500 Subject: Input: ESS Solo (OSS) - do not carry around gameport code if gameport core support is disabled. Signed-off-by: Dmitry Torokhov --- sound/oss/esssolo1.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'sound') diff --git a/sound/oss/esssolo1.c b/sound/oss/esssolo1.c index 6b3b9a99579..a682ab1242c 100644 --- a/sound/oss/esssolo1.c +++ b/sound/oss/esssolo1.c @@ -149,6 +149,10 @@ #define FMODE_DMFM 0x10 +#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) +#define SUPPORT_JOYSTICK 1 +#endif + static struct pci_driver solo1_driver; /* --------------------------------------------------------------------- */ @@ -226,7 +230,9 @@ struct solo1_state { unsigned char obuf[MIDIOUTBUF]; } midi; +#if SUPPORT_JOYSTICK struct gameport *gameport; +#endif }; /* --------------------------------------------------------------------- */ @@ -2280,6 +2286,7 @@ solo1_resume(struct pci_dev *pci_dev) { return 0; } +#ifdef SUPPORT_JOYSTICK static int __devinit solo1_register_gameport(struct solo1_state *s, int io_port) { struct gameport *gp; @@ -2306,6 +2313,19 @@ static int __devinit solo1_register_gameport(struct solo1_state *s, int io_port) return 0; } +static inline void solo1_unregister_gameport(struct solo1_state *s) +{ + if (s->gameport) { + int gpio = s->gameport->io; + gameport_unregister_port(s->gameport); + release_region(gpio, GAMEPORT_EXTENT); + } +} +#else +static inline int solo1_register_gameport(struct solo1_state *s, int io_port) { return -ENOSYS; } +static inline void solo1_unregister_gameport(struct solo1_state *s) { } +#endif /* SUPPORT_JOYSTICK */ + static int __devinit solo1_probe(struct pci_dev *pcidev, const struct pci_device_id *pciid) { struct solo1_state *s; @@ -2437,11 +2457,7 @@ static void __devexit solo1_remove(struct pci_dev *dev) synchronize_irq(s->irq); pci_write_config_word(s->dev, 0x60, 0); /* turn off DDMA controller address space */ free_irq(s->irq, s); - if (s->gameport) { - int gpio = s->gameport->io; - gameport_unregister_port(s->gameport); - release_region(gpio, GAMEPORT_EXTENT); - } + solo1_unregister_gameport(s); release_region(s->iobase, IOBASE_EXTENT); release_region(s->sbbase+FMSYNTH_EXTENT, SBBASE_EXTENT-FMSYNTH_EXTENT); release_region(s->ddmabase, DDMABASE_EXTENT); -- cgit v1.2.3 From 263aba711eabd4b63b70dfe8f78e3a8a7ce65fa9 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Wed, 1 Jun 2005 02:38:37 -0500 Subject: Input: trident (OSS) - do not carry around gameport code if gameport core support is disabled, some formatting changes. Signed-off-by: Dmitry Torokhov --- sound/oss/trident.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) (limited to 'sound') diff --git a/sound/oss/trident.c b/sound/oss/trident.c index 47537f0a5b0..5f0ad6bb43b 100644 --- a/sound/oss/trident.c +++ b/sound/oss/trident.c @@ -228,6 +228,10 @@ #define DRIVER_VERSION "0.14.10j-2.6" +#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) +#define SUPPORT_JOYSTICK 1 +#endif + /* magic numbers to protect our data structures */ #define TRIDENT_CARD_MAGIC 0x5072696E /* "Prin" */ #define TRIDENT_STATE_MAGIC 0x63657373 /* "cess" */ @@ -4252,24 +4256,25 @@ trident_ac97_init(struct trident_card *card) return num_ac97 + 1; } +#ifdef SUPPORT_JOYSTICK /* Gameport functions for the cards ADC gameport */ -static unsigned char -trident_game_read(struct gameport *gameport) +static unsigned char trident_game_read(struct gameport *gameport) { struct trident_card *card = gameport->port_data; + return inb(TRID_REG(card, T4D_GAME_LEG)); } -static void -trident_game_trigger(struct gameport *gameport) +static void trident_game_trigger(struct gameport *gameport) { struct trident_card *card = gameport->port_data; + outb(0xff, TRID_REG(card, T4D_GAME_LEG)); } -static int -trident_game_cooked_read(struct gameport *gameport, int *axes, int *buttons) +static int trident_game_cooked_read(struct gameport *gameport, + int *axes, int *buttons) { struct trident_card *card = gameport->port_data; int i; @@ -4285,8 +4290,7 @@ trident_game_cooked_read(struct gameport *gameport, int *axes, int *buttons) return 0; } -static int -trident_game_open(struct gameport *gameport, int mode) +static int trident_game_open(struct gameport *gameport, int mode) { struct trident_card *card = gameport->port_data; @@ -4305,8 +4309,7 @@ trident_game_open(struct gameport *gameport, int mode) return 0; } -static int __devinit -trident_register_gameport(struct trident_card *card) +static int __devinit trident_register_gameport(struct trident_card *card) { struct gameport *gp; @@ -4330,6 +4333,17 @@ trident_register_gameport(struct trident_card *card) return 0; } +static inline void trident_unregister_gameport(struct trident_card *card) +{ + if (card->gameport) + gameport_unregister_port(card->gameport); +} + +#else +static inline int trident_register_gameport(struct trident_card *card) { return -ENOSYS; } +static inline void trident_unregister_gameport(struct trident_card *card) { } +#endif /* SUPPORT_JOYSTICK */ + /* install the driver, we do not allocate hardware channel nor DMA buffer */ /* now, they are defered until "ACCESS" time (in prog_dmabuf called by */ /* open/read/write/ioctl/mmap) */ @@ -4569,8 +4583,7 @@ trident_remove(struct pci_dev *pci_dev) } /* Unregister gameport */ - if (card->gameport) - gameport_unregister_port(card->gameport); + trident_unregister_gameport(card); /* Kill interrupts, and SP/DIF */ trident_disable_loop_interrupts(card); -- cgit v1.2.3 From ba7376e9348eceda21884cda87e714093260aed2 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Wed, 1 Jun 2005 02:38:43 -0500 Subject: Input: sonicvibes (OSS) - do not carry around gameport code if gameport core support is disabled. Signed-off-by: Dmitry Torokhov --- sound/oss/sonicvibes.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'sound') diff --git a/sound/oss/sonicvibes.c b/sound/oss/sonicvibes.c index 06047e7979a..17d0e461f8d 100644 --- a/sound/oss/sonicvibes.c +++ b/sound/oss/sonicvibes.c @@ -122,6 +122,9 @@ #include "dm.h" +#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) +#define SUPPORT_JOYSTICK 1 +#endif /* --------------------------------------------------------------------- */ @@ -365,7 +368,9 @@ struct sv_state { unsigned char obuf[MIDIOUTBUF]; } midi; +#if SUPPORT_JOYSTICK struct gameport *gameport; +#endif }; /* --------------------------------------------------------------------- */ @@ -2485,6 +2490,7 @@ static struct initvol { #define RSRCISIOREGION(dev,num) (pci_resource_start((dev), (num)) != 0 && \ (pci_resource_flags((dev), (num)) & IORESOURCE_IO)) +#ifdef SUPPORT_JOYSTICK static int __devinit sv_register_gameport(struct sv_state *s, int io_port) { struct gameport *gp; @@ -2511,6 +2517,19 @@ static int __devinit sv_register_gameport(struct sv_state *s, int io_port) return 0; } +static inline void sv_unregister_gameport(struct sv_state *s) +{ + if (s->gameport) { + int gpio = s->gameport->io; + gameport_unregister_port(s->gameport); + release_region(gpio, SV_EXTENT_GAME); + } +} +#else +static inline int sv_register_gameport(struct sv_state *s, int io_port) { return -ENOSYS; } +static inline void sv_unregister_gameport(struct sv_state *s) { } +#endif /* SUPPORT_JOYSTICK */ + static int __devinit sv_probe(struct pci_dev *pcidev, const struct pci_device_id *pciid) { static char __devinitdata sv_ddma_name[] = "S3 Inc. SonicVibes DDMA Controller"; @@ -2711,11 +2730,7 @@ static void __devexit sv_remove(struct pci_dev *dev) /*outb(0, s->iodmaa + SV_DMA_RESET);*/ /*outb(0, s->iodmac + SV_DMA_RESET);*/ free_irq(s->irq, s); - if (s->gameport) { - int gpio = s->gameport->io; - gameport_unregister_port(s->gameport); - release_region(gpio, SV_EXTENT_GAME); - } + sv_unregister_gameport(s); release_region(s->iodmac, SV_EXTENT_DMA); release_region(s->iodmaa, SV_EXTENT_DMA); release_region(s->ioenh, SV_EXTENT_ENH); -- cgit v1.2.3 From e608460dee4c2de3a01f67c1bac21adb61d617e3 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Wed, 1 Jun 2005 02:38:46 -0500 Subject: Input: mad16 (OSS) - do not carry around gameport code if gameport core support is disabled. Signed-off-by: Dmitry Torokhov --- sound/oss/mad16.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'sound') diff --git a/sound/oss/mad16.c b/sound/oss/mad16.c index a7067f16991..aa3c50db66c 100644 --- a/sound/oss/mad16.c +++ b/sound/oss/mad16.c @@ -50,9 +50,12 @@ #include "sb.h" #include "mpu401.h" +#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) +#define SUPPORT_JOYSTICK 1 +#endif + static int mad16_conf; static int mad16_cdsel; -static struct gameport *gameport; static DEFINE_SPINLOCK(lock); #define C928 1 @@ -902,6 +905,10 @@ static int __initdata irq_map[16] = -1, -1, -1, -1 }; +#ifdef SUPPORT_JOYSTICK + +static struct gameport *gameport; + static int __devinit mad16_register_gameport(int io_port) { if (!request_region(io_port, 1, "mad16 gameport")) { @@ -925,6 +932,20 @@ static int __devinit mad16_register_gameport(int io_port) return 0; } +static inline void mad16_unregister_gameport(void) +{ + if (gameport) { + /* the gameport was initialized so we must free it up */ + gameport_unregister_port(gameport); + gameport = NULL; + release_region(0x201, 1); + } +} +#else +static inline int mad16_register_gameport(int io_port) { return -ENOSYS; } +static inline void mad16_unregister_gameport(void) { } +#endif + static int __devinit init_mad16(void) { int dmatype = 0; @@ -1060,12 +1081,7 @@ static void __exit cleanup_mad16(void) { if (found_mpu) unload_mad16_mpu(&cfg_mpu); - if (gameport) { - /* the gameport was initialized so we must free it up */ - gameport_unregister_port(gameport); - gameport = NULL; - release_region(0x201, 1); - } + mad16_unregister_gameport(); unload_mad16(&cfg); release_region(MC0_PORT, 12); } -- cgit v1.2.3 From f0f05a42268a8f3dc9dafbcec8ee67f9f8e5cec4 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Wed, 1 Jun 2005 02:38:53 -0500 Subject: Input: make sure that joystick support in CMPCI driver can only be selected if either gameport is built-in or _both_ gameport and cmpci are built as modules. Signed-off-by: Dmitry Torokhov --- sound/oss/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/oss/Kconfig b/sound/oss/Kconfig index e537bd66a70..33e28089f8d 100644 --- a/sound/oss/Kconfig +++ b/sound/oss/Kconfig @@ -52,7 +52,7 @@ config SOUND_CMPCI_MIDI config SOUND_CMPCI_JOYSTICK bool "Enable joystick" - depends on SOUND_CMPCI && X86 + depends on SOUND_CMPCI && X86 && (GAMEPORT=y || SOUND_CMPCI=GAMEPORT) help Say Y here in order to enable the joystick port on a sound card using the CMI8338 or the CMI8738 chipset. You need to config the -- cgit v1.2.3 From c624e92160e0d503594aff05a1e53fd0aafe41ad Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Wed, 1 Jun 2005 02:39:00 -0500 Subject: Input: ES1370 (OSS) - do not carry around gameport code if gameport core support is disabled. Signed-off-by: Dmitry Torokhov --- sound/oss/es1370.c | 88 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 30 deletions(-) (limited to 'sound') diff --git a/sound/oss/es1370.c b/sound/oss/es1370.c index 056091cff26..563a52fbdd3 100644 --- a/sound/oss/es1370.c +++ b/sound/oss/es1370.c @@ -161,6 +161,10 @@ #include #include +#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) +#define SUPPORT_JOYSTICK +#endif + /* --------------------------------------------------------------------- */ #undef OSS_DOCUMENTED_MIXER_SEMANTICS @@ -384,7 +388,10 @@ struct es1370_state { unsigned char obuf[MIDIOUTBUF]; } midi; +#ifdef SUPPORT_JOYSTICK struct gameport *gameport; +#endif + struct semaphore sem; }; @@ -2553,10 +2560,55 @@ static struct initvol { { SOUND_MIXER_WRITE_OGAIN, 0x4040 } }; +#ifdef SUPPORT_JOYSTICK + +static int __devinit es1370_register_gameport(struct es1370_state *s) +{ + struct gameport *gp; + + if (!request_region(0x200, JOY_EXTENT, "es1370")) { + printk(KERN_ERR "es1370: joystick io port 0x200 in use\n"); + return -EBUSY; + } + + s->gameport = gp = gameport_allocate_port(); + if (!gp) { + printk(KERN_ERR "es1370: can not allocate memory for gameport\n"); + release_region(0x200, JOY_EXTENT); + return -ENOMEM; + } + + gameport_set_name(gp, "ESS1370"); + gameport_set_phys(gp, "pci%s/gameport0", pci_name(s->dev)); + gp->dev.parent = &s->dev->dev; + gp->io = 0x200; + + s->ctrl |= CTRL_JYSTK_EN; + outl(s->ctrl, s->io + ES1370_REG_CONTROL); + + gameport_register_port(gp); + + return 0; +} + +static inline void es1370_unregister_gameport(struct es1370_state *s) +{ + if (s->gameport) { + int gpio = s->gameport->io; + gameport_unregister_port(s->gameport); + release_region(gpio, JOY_EXTENT); + + } +} + +#else +static inline int es1370_register_gameport(struct es1370_state *s) { return -ENOSYS; } +static inline void es1370_unregister_gameport(struct es1370_state *s) { } +#endif /* SUPPORT_JOYSTICK */ + static int __devinit es1370_probe(struct pci_dev *pcidev, const struct pci_device_id *pciid) { struct es1370_state *s; - struct gameport *gp = NULL; mm_segment_t fs; int i, val, ret; @@ -2605,28 +2657,14 @@ static int __devinit es1370_probe(struct pci_dev *pcidev, const struct pci_devic /* note: setting CTRL_SERR_DIS is reported to break * mic bias setting (by Kim.Berts@fisub.mail.abb.com) */ s->ctrl = CTRL_CDC_EN | (DAC2_SRTODIV(8000) << CTRL_SH_PCLKDIV) | (1 << CTRL_SH_WTSRSEL); - if (!request_region(0x200, JOY_EXTENT, "es1370")) { - printk(KERN_ERR "es1370: joystick io port 0x200 in use\n"); - } else if (!(s->gameport = gp = gameport_allocate_port())) { - printk(KERN_ERR "es1370: can not allocate memory for gameport\n"); - release_region(0x200, JOY_EXTENT); - } else { - gameport_set_name(gp, "ESS1370"); - gameport_set_phys(gp, "pci%s/gameport0", pci_name(s->dev)); - gp->dev.parent = &s->dev->dev; - gp->io = 0x200; - s->ctrl |= CTRL_JYSTK_EN; - } if (lineout[devindex]) s->ctrl |= CTRL_XCTL0; if (micbias[devindex]) s->ctrl |= CTRL_XCTL1; s->sctrl = 0; - printk(KERN_INFO "es1370: found adapter at io %#lx irq %u\n" - KERN_INFO "es1370: features: joystick %s, line %s, mic impedance %s\n", - s->io, s->irq, (s->ctrl & CTRL_JYSTK_EN) ? "on" : "off", - (s->ctrl & CTRL_XCTL0) ? "out" : "in", - (s->ctrl & CTRL_XCTL1) ? "1" : "0"); + printk(KERN_INFO "es1370: adapter at io %#lx irq %u, line %s, mic impedance %s\n", + s->io, s->irq, (s->ctrl & CTRL_XCTL0) ? "out" : "in", + (s->ctrl & CTRL_XCTL1) ? "1" : "0"); /* register devices */ if ((s->dev_audio = register_sound_dsp(&es1370_audio_fops, -1)) < 0) { ret = s->dev_audio; @@ -2672,9 +2710,7 @@ static int __devinit es1370_probe(struct pci_dev *pcidev, const struct pci_devic } set_fs(fs); - /* register gameport */ - if (gp) - gameport_register_port(gp); + es1370_register_gameport(s); /* store it in the driver field */ pci_set_drvdata(pcidev, s); @@ -2696,10 +2732,6 @@ static int __devinit es1370_probe(struct pci_dev *pcidev, const struct pci_devic err_dev1: printk(KERN_ERR "es1370: cannot register misc device\n"); free_irq(s->irq, s); - if (s->gameport) { - release_region(s->gameport->io, JOY_EXTENT); - gameport_free_port(s->gameport); - } err_irq: release_region(s->io, ES1370_EXTENT); err_region: @@ -2718,11 +2750,7 @@ static void __devexit es1370_remove(struct pci_dev *dev) outl(0, s->io+ES1370_REG_SERIAL_CONTROL); /* clear serial interrupts */ synchronize_irq(s->irq); free_irq(s->irq, s); - if (s->gameport) { - int gpio = s->gameport->io; - gameport_unregister_port(s->gameport); - release_region(gpio, JOY_EXTENT); - } + es1370_unregister_gameport(s); release_region(s->io, ES1370_EXTENT); unregister_sound_dsp(s->dev_audio); unregister_sound_mixer(s->dev_mixer); -- cgit v1.2.3 From 5d503e5cf42de82fc091ef641fd0b0fe027fc180 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Wed, 1 Jun 2005 02:39:04 -0500 Subject: Input: ES1371 (OSS) - do not carry around gameport code if gameport core support is disabled. Signed-off-by: Dmitry Torokhov --- sound/oss/es1371.c | 95 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 63 insertions(+), 32 deletions(-) (limited to 'sound') diff --git a/sound/oss/es1371.c b/sound/oss/es1371.c index a50fddaeea2..c38ae1eca25 100644 --- a/sound/oss/es1371.c +++ b/sound/oss/es1371.c @@ -133,6 +133,10 @@ #include #include +#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) +#define SUPPORT_JOYSTICK +#endif + /* --------------------------------------------------------------------- */ #undef OSS_DOCUMENTED_MIXER_SEMANTICS @@ -453,7 +457,10 @@ struct es1371_state { unsigned char obuf[MIDIOUTBUF]; } midi; +#ifdef SUPPORT_JOYSTICK struct gameport *gameport; +#endif + struct semaphore sem; }; @@ -2786,12 +2793,63 @@ static struct { PCI_ANY_ID, PCI_ANY_ID } }; +#ifdef SUPPORT_JOYSTICK + +static int __devinit es1371_register_gameport(struct es1371_state *s) +{ + struct gameport *gp; + int gpio; + + for (gpio = 0x218; gpio >= 0x200; gpio -= 0x08) + if (request_region(gpio, JOY_EXTENT, "es1371")) + break; + + if (gpio < 0x200) { + printk(KERN_ERR PFX "no free joystick address found\n"); + return -EBUSY; + } + + s->gameport = gp = gameport_allocate_port(); + if (!gp) { + printk(KERN_ERR PFX "can not allocate memory for gameport\n"); + release_region(gpio, JOY_EXTENT); + return -ENOMEM; + } + + gameport_set_name(gp, "ESS1371 Gameport"); + gameport_set_phys(gp, "isa%04x/gameport0", gpio); + gp->dev.parent = &s->dev->dev; + gp->io = gpio; + + s->ctrl |= CTRL_JYSTK_EN | (((gpio >> 3) & CTRL_JOY_MASK) << CTRL_JOY_SHIFT); + outl(s->ctrl, s->io + ES1371_REG_CONTROL); + + gameport_register_port(gp); + + return 0; +} + +static inline void es1371_unregister_gameport(struct es1371_state *s) +{ + if (s->gameport) { + int gpio = s->gameport->io; + gameport_unregister_port(s->gameport); + release_region(gpio, JOY_EXTENT); + + } +} + +#else +static inline int es1371_register_gameport(struct es1371_state *s) { return -ENOSYS; } +static inline void es1371_unregister_gameport(struct es1371_state *s) { } +#endif /* SUPPORT_JOYSTICK */ + + static int __devinit es1371_probe(struct pci_dev *pcidev, const struct pci_device_id *pciid) { struct es1371_state *s; - struct gameport *gp; mm_segment_t fs; - int i, gpio, val, res = -1; + int i, val, res = -1; int idx; unsigned long tmo; signed long tmo2; @@ -2882,23 +2940,6 @@ static int __devinit es1371_probe(struct pci_dev *pcidev, const struct pci_devic } } - for (gpio = 0x218; gpio >= 0x200; gpio -= 0x08) - if (request_region(gpio, JOY_EXTENT, "es1371")) - break; - - if (gpio < 0x200) { - printk(KERN_ERR PFX "no free joystick address found\n"); - } else if (!(s->gameport = gp = gameport_allocate_port())) { - printk(KERN_ERR PFX "can not allocate memory for gameport\n"); - release_region(gpio, JOY_EXTENT); - } else { - gameport_set_name(gp, "ESS1371 Gameport"); - gameport_set_phys(gp, "isa%04x/gameport0", gpio); - gp->dev.parent = &s->dev->dev; - gp->io = gpio; - s->ctrl |= CTRL_JYSTK_EN | (((gpio >> 3) & CTRL_JOY_MASK) << CTRL_JOY_SHIFT); - } - s->sctrl = 0; cssr = 0; s->spdif_volume = -1; @@ -2968,9 +3009,7 @@ static int __devinit es1371_probe(struct pci_dev *pcidev, const struct pci_devic /* turn on S/PDIF output driver if requested */ outl(cssr, s->io+ES1371_REG_STATUS); - /* register gameport */ - if (s->gameport) - gameport_register_port(s->gameport); + es1371_register_gameport(s); /* store it in the driver field */ pci_set_drvdata(pcidev, s); @@ -2979,13 +3018,9 @@ static int __devinit es1371_probe(struct pci_dev *pcidev, const struct pci_devic /* increment devindex */ if (devindex < NR_DEVICE-1) devindex++; - return 0; + return 0; err_gp: - if (s->gameport) { - release_region(s->gameport->io, JOY_EXTENT); - gameport_free_port(s->gameport); - } #ifdef ES1371_DEBUG if (s->ps) remove_proc_entry("es1371", NULL); @@ -3024,11 +3059,7 @@ static void __devexit es1371_remove(struct pci_dev *dev) outl(0, s->io+ES1371_REG_SERIAL_CONTROL); /* clear serial interrupts */ synchronize_irq(s->irq); free_irq(s->irq, s); - if (s->gameport) { - int gpio = s->gameport->io; - gameport_unregister_port(s->gameport); - release_region(gpio, JOY_EXTENT); - } + es1371_unregister_gameport(s); release_region(s->io, ES1371_EXTENT); unregister_sound_dsp(s->dev_audio); unregister_sound_mixer(s->codec->dev_mixer); -- cgit v1.2.3 From cc2d7eeacaff6ccdf407a3555cc3373890f79e01 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Wed, 1 Jun 2005 02:39:11 -0500 Subject: Input: kill empty comment in gameport support section of cs4281 ALSA driver. Signed-off-by: Adrian Bunk Signed-off-by: Vojtech Pavlik Signed-off-by: Dmitry Torokhov --- sound/pci/cs4281.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'sound') diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c index d7e06b3caf9..0b53f7c61f8 100644 --- a/sound/pci/cs4281.c +++ b/sound/pci/cs4281.c @@ -1335,11 +1335,6 @@ static inline int snd_cs4281_create_gameport(cs4281_t *chip) { return -ENOSYS; } static inline void snd_cs4281_free_gameport(cs4281_t *chip) { } #endif /* CONFIG_GAMEPORT || (MODULE && CONFIG_GAMEPORT_MODULE) */ - -/* - - */ - static int snd_cs4281_free(cs4281_t *chip) { snd_cs4281_free_gameport(chip); -- cgit v1.2.3