Merge branch 'asoc-fix-cs4271' into asoc-cs4271
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 24 Dec 2012 15:52:48 +0000 (15:52 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 24 Dec 2012 15:52:48 +0000 (15:52 +0000)
1  2 
sound/soc/codecs/cs4271.c

index 4f1127935fdf5f9578970b13fcf73b8815d469e5,449a98b8874c4e94885af79c29e2666145719f4e..ac8742a1f25ab7c69fcca2b22458ae02acf3d67e
@@@ -474,16 -474,16 +474,16 @@@ static int cs4271_probe(struct snd_soc_
        struct cs4271_platform_data *cs4271plat = codec->dev->platform_data;
        int ret;
        int gpio_nreset = -EINVAL;
-       int amutec_eq_bmutec = 0;
+       bool amutec_eq_bmutec = false;
  
  #ifdef CONFIG_OF
        if (of_match_device(cs4271_dt_ids, codec->dev)) {
                gpio_nreset = of_get_named_gpio(codec->dev->of_node,
                                                "reset-gpio", 0);
  
-               if (!of_get_property(codec->dev->of_node,
+               if (of_get_property(codec->dev->of_node,
                                     "cirrus,amutec-eq-bmutec", NULL))
-                       amutec_eq_bmutec = 1;
+                       amutec_eq_bmutec = true;
        }
  #endif
  
        }
  
        if (gpio_nreset >= 0)
 -              if (gpio_request(gpio_nreset, "CS4271 Reset"))
 +              if (devm_gpio_request(codec->dev, gpio_nreset, "CS4271 Reset"))
                        gpio_nreset = -EINVAL;
        if (gpio_nreset >= 0) {
                /* Reset codec */
  static int cs4271_remove(struct snd_soc_codec *codec)
  {
        struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);
 -      int gpio_nreset;
  
 -      gpio_nreset = cs4271->gpio_nreset;
 -
 -      if (gpio_is_valid(gpio_nreset)) {
 +      if (gpio_is_valid(cs4271->gpio_nreset))
                /* Set codec to the reset state */
 -              gpio_set_value(gpio_nreset, 0);
 -              gpio_free(gpio_nreset);
 -      }
 +              gpio_set_value(cs4271->gpio_nreset, 0);
  
        return 0;
  };
@@@ -570,7 -575,7 +570,7 @@@ static struct snd_soc_codec_driver soc_
  };
  
  #if defined(CONFIG_SPI_MASTER)
 -static int __devinit cs4271_spi_probe(struct spi_device *spi)
 +static int cs4271_spi_probe(struct spi_device *spi)
  {
        struct cs4271_private *cs4271;
  
                &cs4271_dai, 1);
  }
  
 -static int __devexit cs4271_spi_remove(struct spi_device *spi)
 +static int cs4271_spi_remove(struct spi_device *spi)
  {
        snd_soc_unregister_codec(&spi->dev);
        return 0;
@@@ -598,7 -603,7 +598,7 @@@ static struct spi_driver cs4271_spi_dri
                .of_match_table = of_match_ptr(cs4271_dt_ids),
        },
        .probe          = cs4271_spi_probe,
 -      .remove         = __devexit_p(cs4271_spi_remove),
 +      .remove         = cs4271_spi_remove,
  };
  #endif /* defined(CONFIG_SPI_MASTER) */
  
@@@ -609,8 -614,8 +609,8 @@@ static const struct i2c_device_id cs427
  };
  MODULE_DEVICE_TABLE(i2c, cs4271_i2c_id);
  
 -static int __devinit cs4271_i2c_probe(struct i2c_client *client,
 -                                    const struct i2c_device_id *id)
 +static int cs4271_i2c_probe(struct i2c_client *client,
 +                          const struct i2c_device_id *id)
  {
        struct cs4271_private *cs4271;
  
                &cs4271_dai, 1);
  }
  
 -static int __devexit cs4271_i2c_remove(struct i2c_client *client)
 +static int cs4271_i2c_remove(struct i2c_client *client)
  {
        snd_soc_unregister_codec(&client->dev);
        return 0;
@@@ -639,7 -644,7 +639,7 @@@ static struct i2c_driver cs4271_i2c_dri
        },
        .id_table       = cs4271_i2c_id,
        .probe          = cs4271_i2c_probe,
 -      .remove         = __devexit_p(cs4271_i2c_remove),
 +      .remove         = cs4271_i2c_remove,
  };
  #endif /* defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) */