diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2012-11-13 03:28:45 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-11-21 10:08:00 -0500 |
commit | 14591d888e35c12b15eccf54e490c7769eb6d6d2 (patch) | |
tree | 16631920135867d55fbdace5073cd89b61446c72 /drivers/gpio | |
parent | 2473d25a2f61985f8980c7c3d41cb85da1abea0f (diff) |
mfd/rtc/gpio: twl: No need to allocate bigger buffer for write
Since the twl-core has been converted to use regmap it is no longer needed
to allocate bigger buffer for data when writing to twl.
CC: Grant Likely <grant.likely@secretlab.ca>
CC: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-twl4030.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-twl4030.c b/drivers/gpio/gpio-twl4030.c index c5f8ca233e1f..88829c3337bf 100644 --- a/drivers/gpio/gpio-twl4030.c +++ b/drivers/gpio/gpio-twl4030.c | |||
@@ -354,13 +354,13 @@ static struct gpio_chip twl_gpiochip = { | |||
354 | 354 | ||
355 | static int __devinit gpio_twl4030_pulls(u32 ups, u32 downs) | 355 | static int __devinit gpio_twl4030_pulls(u32 ups, u32 downs) |
356 | { | 356 | { |
357 | u8 message[6]; | 357 | u8 message[5]; |
358 | unsigned i, gpio_bit; | 358 | unsigned i, gpio_bit; |
359 | 359 | ||
360 | /* For most pins, a pulldown was enabled by default. | 360 | /* For most pins, a pulldown was enabled by default. |
361 | * We should have data that's specific to this board. | 361 | * We should have data that's specific to this board. |
362 | */ | 362 | */ |
363 | for (gpio_bit = 1, i = 1; i < 6; i++) { | 363 | for (gpio_bit = 1, i = 0; i < 5; i++) { |
364 | u8 bit_mask; | 364 | u8 bit_mask; |
365 | unsigned j; | 365 | unsigned j; |
366 | 366 | ||
@@ -379,16 +379,16 @@ static int __devinit gpio_twl4030_pulls(u32 ups, u32 downs) | |||
379 | 379 | ||
380 | static int __devinit gpio_twl4030_debounce(u32 debounce, u8 mmc_cd) | 380 | static int __devinit gpio_twl4030_debounce(u32 debounce, u8 mmc_cd) |
381 | { | 381 | { |
382 | u8 message[4]; | 382 | u8 message[3]; |
383 | 383 | ||
384 | /* 30 msec of debouncing is always used for MMC card detect, | 384 | /* 30 msec of debouncing is always used for MMC card detect, |
385 | * and is optional for everything else. | 385 | * and is optional for everything else. |
386 | */ | 386 | */ |
387 | message[1] = (debounce & 0xff) | (mmc_cd & 0x03); | 387 | message[0] = (debounce & 0xff) | (mmc_cd & 0x03); |
388 | debounce >>= 8; | 388 | debounce >>= 8; |
389 | message[2] = (debounce & 0xff); | 389 | message[1] = (debounce & 0xff); |
390 | debounce >>= 8; | 390 | debounce >>= 8; |
391 | message[3] = (debounce & 0x03); | 391 | message[2] = (debounce & 0x03); |
392 | 392 | ||
393 | return twl_i2c_write(TWL4030_MODULE_GPIO, message, | 393 | return twl_i2c_write(TWL4030_MODULE_GPIO, message, |
394 | REG_GPIO_DEBEN1, 3); | 394 | REG_GPIO_DEBEN1, 3); |