Changeset 17079


Ignore:
Timestamp:
2009-08-01T15:35:17+02:00 (7 years ago)
Author:
lars
Message:

fix patch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/generic-2.6/patches-2.6.30/780-fix-race-in-snd_soc_jack_add_gpios.patch

    r17071 r17079  
    1 From d8d0421cddc6ecdec166612d914b8edbcdb96ed0 Mon Sep 17 00:00:00 2001 
    2 From: Lars-Peter Clausen <lars@metafoo.de> 
    3 Date: Fri, 31 Jul 2009 20:33:31 +0200 
    4 Subject: [PATCH] ASoC: jack: Fix race in snd_soc_jack_add_gpios 
     1commit 5ced436d549d911ce610ea47d85f71fae5bbfce4 
     2Author: Lars-Peter Clausen <lars@metafoo.de> 
     3Date:   Fri Jul 31 18:26:48 2009 +0200 
    54 
    6 The irq can fire as soon as it has been requested, thus all fields accessed 
    7 from within the irq handler must be initialized prior to requesting the irq. 
    8  
    9 Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> 
    10 --- 
    11 The patch is against alsa-kernel/master but I guess something similar should also 
    12 go into 2.6.31. 
    13  
    14  sound/soc/soc-jack.c |    6 +++--- 
    15  1 files changed, 3 insertions(+), 3 deletions(-) 
     5    ASoC: jack: Fix race in snd_soc_jack_add_gpios 
     6     
     7    The irq can fire as soon as it has been requested, thus all fields accessed 
     8    from within the irq handler must be initialized prior to requesting the irq. 
     9     
     10    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> 
    1611 
    1712diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c 
    18 index 4aa7d8f..1d455ab 100644 
     13index 28346fb..639333a 100644 
    1914--- a/sound/soc/soc-jack.c 
    2015+++ b/sound/soc/soc-jack.c 
    21 @@ -221,6 +221,9 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, 
     16@@ -220,6 +220,9 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, 
    2217                if (ret) 
    2318                        goto err; 
     
    2924                                gpio_handler, 
    3025                                IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, 
    31 @@ -234,9 +237,6 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, 
    32                 gpio_export(gpios[i].gpio, false); 
    33  #endif 
    34   
     26@@ -227,9 +230,6 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, 
     27                                &gpios[i]); 
     28                if (ret) 
     29                        goto err; 
     30- 
    3531-               INIT_WORK(&gpios[i].work, gpio_work); 
    3632-               gpios[i].jack = jack; 
    37 - 
    38                 /* Update initial jack status */ 
    39                 snd_soc_jack_gpio_detect(&gpios[i]); 
    4033        } 
    41 --  
    42 1.5.6.5 
    43  
     34  
     35        return 0; 
Note: See TracChangeset for help on using the changeset viewer.