Skip to content

Commit

Permalink
mfd: Use gpio_request_one from dm355evm_msp
Browse files Browse the repository at this point in the history
Use gpio_request_one() instead of multiple gpiolib calls.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Axel Lin authored and Samuel Ortiz committed Jan 8, 2012
1 parent aced760 commit 97f2bf5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/mfd/dm355evm_msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,7 @@ static int add_children(struct i2c_client *client)
for (i = 0; i < ARRAY_SIZE(config_inputs); i++) {
int gpio = dm355evm_msp_gpio.base + config_inputs[i].offset;

gpio_request(gpio, config_inputs[i].label);
gpio_direction_input(gpio);
gpio_request_one(gpio, GPIOF_IN, config_inputs[i].label);

/* make it easy for userspace to see these */
gpio_export(gpio, false);
Expand Down

0 comments on commit 97f2bf5

Please sign in to comment.