Skip to content

Commit

Permalink
ASoC: Minor fixups to tpa6130a2 driver
Browse files Browse the repository at this point in the history
- Staticise ttpa6130a2_client.
- Remove unneeded cast from void.
- Use explict NULL rather than 0.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Oct 9, 2009
1 parent 493b67e commit ebab1b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sound/soc/codecs/tpa6130a2.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#include "tpa6130a2.h"

struct i2c_client *tpa6130a2_client;
static struct i2c_client *tpa6130a2_client;

/* This struct is used to save the context */
struct tpa6130a2_data {
Expand Down Expand Up @@ -372,7 +372,7 @@ static int tpa6130a2_probe(struct i2c_client *client,

i2c_set_clientdata(tpa6130a2_client, data);

pdata = (struct tpa6130a2_platform_data *)client->dev.platform_data;
pdata = client->dev.platform_data;
data->power_gpio = pdata->power_gpio;

mutex_init(&data->mutex);
Expand Down Expand Up @@ -410,7 +410,7 @@ static int tpa6130a2_probe(struct i2c_client *client,
fail:
kfree(data);
i2c_set_clientdata(tpa6130a2_client, NULL);
tpa6130a2_client = 0;
tpa6130a2_client = NULL;

return ret;
}
Expand All @@ -424,7 +424,7 @@ static int tpa6130a2_remove(struct i2c_client *client)
if (data->power_gpio >= 0)
gpio_free(data->power_gpio);
kfree(data);
tpa6130a2_client = 0;
tpa6130a2_client = NULL;

return 0;
}
Expand Down

0 comments on commit ebab1b1

Please sign in to comment.