Skip to content

Commit 99d1edc

Browse files
committed
Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6
gpio bug fixes for v3.3 * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6: gpio: tps65910: Use correct offset for gpio initialization gpio/it8761e: Restrict it8761e gpio driver to x86. gpio-ml-ioh: cleanup __iomem annotation usage gpio-ml-ioh: cleanup NULL pointer checking gpio-pch: cleanup __iomem annotation usage gpio-pch: cleanup NULL pointer checking
2 parents e19c29e + 94bd244 commit 99d1edc

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

drivers/gpio/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ config GPIO_GENERIC_PLATFORM
8787

8888
config GPIO_IT8761E
8989
tristate "IT8761E GPIO support"
90+
depends on X86 # unconditional access to IO space.
9091
help
9192
Say yes here to support GPIO functionality of IT8761E super I/O chip.
9293

drivers/gpio/gpio-ml-ioh.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ static void ioh_gpio_setup(struct ioh_gpio *chip, int num_port)
248248
static int ioh_irq_type(struct irq_data *d, unsigned int type)
249249
{
250250
u32 im;
251-
u32 *im_reg;
251+
void __iomem *im_reg;
252252
u32 ien;
253253
u32 im_pos;
254254
int ch;
@@ -412,7 +412,7 @@ static int __devinit ioh_gpio_probe(struct pci_dev *pdev,
412412
int i, j;
413413
struct ioh_gpio *chip;
414414
void __iomem *base;
415-
void __iomem *chip_save;
415+
void *chip_save;
416416
int irq_base;
417417

418418
ret = pci_enable_device(pdev);
@@ -428,7 +428,7 @@ static int __devinit ioh_gpio_probe(struct pci_dev *pdev,
428428
}
429429

430430
base = pci_iomap(pdev, 1, 0);
431-
if (base == 0) {
431+
if (!base) {
432432
dev_err(&pdev->dev, "%s : pci_iomap failed", __func__);
433433
ret = -ENOMEM;
434434
goto err_iomap;
@@ -521,7 +521,7 @@ static void __devexit ioh_gpio_remove(struct pci_dev *pdev)
521521
int err;
522522
int i;
523523
struct ioh_gpio *chip = pci_get_drvdata(pdev);
524-
void __iomem *chip_save;
524+
void *chip_save;
525525

526526
chip_save = chip;
527527

drivers/gpio/gpio-pch.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ static void pch_gpio_setup(struct pch_gpio *chip)
231231
static int pch_irq_type(struct irq_data *d, unsigned int type)
232232
{
233233
u32 im;
234-
u32 *im_reg;
234+
u32 __iomem *im_reg;
235235
u32 ien;
236236
u32 im_pos;
237237
int ch;
@@ -376,7 +376,7 @@ static int __devinit pch_gpio_probe(struct pci_dev *pdev,
376376
}
377377

378378
chip->base = pci_iomap(pdev, 1, 0);
379-
if (chip->base == 0) {
379+
if (!chip->base) {
380380
dev_err(&pdev->dev, "%s : pci_iomap FAILED", __func__);
381381
ret = -ENOMEM;
382382
goto err_iomap;

drivers/gpio/gpio-tps65910.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static int tps65910_gpio_output(struct gpio_chip *gc, unsigned offset,
5252
struct tps65910 *tps65910 = container_of(gc, struct tps65910, gpio);
5353

5454
/* Set the initial value */
55-
tps65910_gpio_set(gc, 0, value);
55+
tps65910_gpio_set(gc, offset, value);
5656

5757
return tps65910_set_bits(tps65910, TPS65910_GPIO0 + offset,
5858
GPIO_CFG_MASK);

0 commit comments

Comments
 (0)