提交 17a5f49b 编写于 作者: R Radu Rendec 提交者: Bartosz Golaszewski

gpio: pcf857x: Fix indentation of variable declarations

No functional changes. This is a whitespace change only.
Signed-off-by: NRadu Rendec <radu.rendec@gmail.com>
Signed-off-by: NBartosz Golaszewski <bartosz.golaszewski@linaro.org>
上级 4628cb0d
...@@ -121,8 +121,8 @@ static int i2c_read_le16(struct i2c_client *client) ...@@ -121,8 +121,8 @@ static int i2c_read_le16(struct i2c_client *client)
static int pcf857x_input(struct gpio_chip *chip, unsigned int offset) static int pcf857x_input(struct gpio_chip *chip, unsigned int offset)
{ {
struct pcf857x *gpio = gpiochip_get_data(chip); struct pcf857x *gpio = gpiochip_get_data(chip);
int status; int status;
mutex_lock(&gpio->lock); mutex_lock(&gpio->lock);
gpio->out |= (1 << offset); gpio->out |= (1 << offset);
...@@ -134,8 +134,8 @@ static int pcf857x_input(struct gpio_chip *chip, unsigned int offset) ...@@ -134,8 +134,8 @@ static int pcf857x_input(struct gpio_chip *chip, unsigned int offset)
static int pcf857x_get(struct gpio_chip *chip, unsigned int offset) static int pcf857x_get(struct gpio_chip *chip, unsigned int offset)
{ {
struct pcf857x *gpio = gpiochip_get_data(chip); struct pcf857x *gpio = gpiochip_get_data(chip);
int value; int value;
value = gpio->read(gpio->client); value = gpio->read(gpio->client);
return (value < 0) ? value : !!(value & (1 << offset)); return (value < 0) ? value : !!(value & (1 << offset));
...@@ -143,9 +143,9 @@ static int pcf857x_get(struct gpio_chip *chip, unsigned int offset) ...@@ -143,9 +143,9 @@ static int pcf857x_get(struct gpio_chip *chip, unsigned int offset)
static int pcf857x_output(struct gpio_chip *chip, unsigned int offset, int value) static int pcf857x_output(struct gpio_chip *chip, unsigned int offset, int value)
{ {
struct pcf857x *gpio = gpiochip_get_data(chip); struct pcf857x *gpio = gpiochip_get_data(chip);
unsigned int bit = 1 << offset; unsigned int bit = 1 << offset;
int status; int status;
mutex_lock(&gpio->lock); mutex_lock(&gpio->lock);
if (value) if (value)
...@@ -167,7 +167,7 @@ static void pcf857x_set(struct gpio_chip *chip, unsigned int offset, int value) ...@@ -167,7 +167,7 @@ static void pcf857x_set(struct gpio_chip *chip, unsigned int offset, int value)
static irqreturn_t pcf857x_irq(int irq, void *data) static irqreturn_t pcf857x_irq(int irq, void *data)
{ {
struct pcf857x *gpio = data; struct pcf857x *gpio = data;
unsigned long change, i, status; unsigned long change, i, status;
status = gpio->read(gpio->client); status = gpio->read(gpio->client);
...@@ -250,11 +250,11 @@ static const struct irq_chip pcf857x_irq_chip = { ...@@ -250,11 +250,11 @@ static const struct irq_chip pcf857x_irq_chip = {
static int pcf857x_probe(struct i2c_client *client) static int pcf857x_probe(struct i2c_client *client)
{ {
const struct i2c_device_id *id = i2c_client_get_device_id(client); const struct i2c_device_id *id = i2c_client_get_device_id(client);
struct pcf857x_platform_data *pdata = dev_get_platdata(&client->dev); struct pcf857x_platform_data *pdata = dev_get_platdata(&client->dev);
struct device_node *np = client->dev.of_node; struct device_node *np = client->dev.of_node;
struct pcf857x *gpio; struct pcf857x *gpio;
unsigned int n_latch = 0; unsigned int n_latch = 0;
int status; int status;
if (IS_ENABLED(CONFIG_OF) && np) if (IS_ENABLED(CONFIG_OF) && np)
of_property_read_u32(np, "lines-initial-states", &n_latch); of_property_read_u32(np, "lines-initial-states", &n_latch);
...@@ -401,8 +401,8 @@ static int pcf857x_probe(struct i2c_client *client) ...@@ -401,8 +401,8 @@ static int pcf857x_probe(struct i2c_client *client)
static void pcf857x_remove(struct i2c_client *client) static void pcf857x_remove(struct i2c_client *client)
{ {
struct pcf857x_platform_data *pdata = dev_get_platdata(&client->dev); struct pcf857x_platform_data *pdata = dev_get_platdata(&client->dev);
struct pcf857x *gpio = i2c_get_clientdata(client); struct pcf857x *gpio = i2c_get_clientdata(client);
if (pdata && pdata->teardown) if (pdata && pdata->teardown)
pdata->teardown(client, gpio->chip.base, gpio->chip.ngpio, pdata->teardown(client, gpio->chip.base, gpio->chip.ngpio,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册