alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [patch] sound: oss/ad1848: remove some dead code
@ 2017-01-31 11:33 Dan Carpenter
  2017-01-31 20:41 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-01-31 11:33 UTC (permalink / raw)
  To: Jaroslav Kysela
  Cc: Amitoj Kaur Chawla, kernel-janitors, Takashi Iwai, alsa-devel

We never use the irq2dev[] array so we can remove this assignment.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c
index 6368e5c7d0ba..f6156d8169d0 100644
--- a/sound/oss/ad1848.c
+++ b/sound/oss/ad1848.c
@@ -121,11 +121,6 @@ static bool deskpro_xl;
 static bool deskpro_m;
 static bool soundpro;
 
-static volatile signed char irq2dev[17] = {
-	-1, -1, -1, -1, -1, -1, -1, -1,
-	-1, -1, -1, -1, -1, -1, -1, -1, -1
-};
-
 #ifndef EXCLUDE_TIMERS
 static int timer_installed = -1;
 #endif
@@ -2060,7 +2055,7 @@ int ad1848_init (char *name, struct resource *ports, int irq, int dma_playback,
 		else
 			devc->irq_ok = 1;	/* Couldn't test. assume it's OK */
 	} else if (irq < 0)
-		irq2dev[-irq] = devc->dev_no = my_dev;
+		devc->dev_no = my_dev;
 
 #ifndef EXCLUDE_TIMERS
 	if ((capabilities[devc->model].flags & CAP_F_TIMER) &&

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] sound: oss/ad1848: remove some dead code
  2017-01-31 11:33 [patch] sound: oss/ad1848: remove some dead code Dan Carpenter
@ 2017-01-31 20:41 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2017-01-31 20:41 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: alsa-devel, kernel-janitors, Amitoj Kaur Chawla

On Tue, 31 Jan 2017 12:33:31 +0100,
Dan Carpenter wrote:
> 
> We never use the irq2dev[] array so we can remove this assignment.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thanks, applied now.


Takashi

> 
> diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c
> index 6368e5c7d0ba..f6156d8169d0 100644
> --- a/sound/oss/ad1848.c
> +++ b/sound/oss/ad1848.c
> @@ -121,11 +121,6 @@ static bool deskpro_xl;
>  static bool deskpro_m;
>  static bool soundpro;
>  
> -static volatile signed char irq2dev[17] = {
> -	-1, -1, -1, -1, -1, -1, -1, -1,
> -	-1, -1, -1, -1, -1, -1, -1, -1, -1
> -};
> -
>  #ifndef EXCLUDE_TIMERS
>  static int timer_installed = -1;
>  #endif
> @@ -2060,7 +2055,7 @@ int ad1848_init (char *name, struct resource *ports, int irq, int dma_playback,
>  		else
>  			devc->irq_ok = 1;	/* Couldn't test. assume it's OK */
>  	} else if (irq < 0)
> -		irq2dev[-irq] = devc->dev_no = my_dev;
> +		devc->dev_no = my_dev;
>  
>  #ifndef EXCLUDE_TIMERS
>  	if ((capabilities[devc->model].flags & CAP_F_TIMER) &&
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-31 20:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-31 11:33 [patch] sound: oss/ad1848: remove some dead code Dan Carpenter
2017-01-31 20:41 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).