History

Merge tag 'gpio-v5.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO fixes from Linus Walleij: "Not much to say about them, regular fixes: - Fix a bug on the errorpath of gpiochip_add_data_with_key() - IRQ type setting on the spreadtrum GPIO driver" * tag 'gpio-v5.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: Fix gpiochip_add_data_with_key() error path gpio: eic: sprd: Fix incorrect irq type setting for the sync EIC

Linus Torvalds committed 7 years ago

Commit 29279d22 parents 4e40f0f 35779892 files · +9 −4Browse files

Unified · Split

2 files
  1. drivers/gpio/gpio-eic-sprd.c +1 −0
  2. drivers/gpio/gpiolib.c +8 −4
drivers/gpio/gpio-eic-sprd.c+1−0
@@ -414,6 +414,7 @@ static int sprd_eic_irq_set_type(struct irq_data *data, unsigned int flow_type) · 413 unmodified lines
414 irq_set_handler_locked(data, handle_edge_irq);414 irq_set_handler_locked(data, handle_edge_irq);
415 break;415 break;
416 case IRQ_TYPE_EDGE_BOTH:416 case IRQ_TYPE_EDGE_BOTH:
417 sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTMODE, 0);
417 sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTBOTH, 1);418 sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTBOTH, 1);
418 irq_set_handler_locked(data, handle_edge_irq);419 irq_set_handler_locked(data, handle_edge_irq);
419 break;420 break;
drivers/gpio/gpiolib.c+8−4
@@ -1379,7 +1379,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data, · 1378 unmodified lines
1379 1379
1380 status = gpiochip_add_irqchip(chip, lock_key, request_key);1380 status = gpiochip_add_irqchip(chip, lock_key, request_key);
1381 if (status)1381 if (status)
1382 goto err_remove_chip;1382 goto err_free_gpiochip_mask;
1383 1383
1384 status = of_gpiochip_add(chip);1384 status = of_gpiochip_add(chip);
1385 if (status)1385 if (status)
@@ -1387,7 +1387,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data, · 1 unmodified line
1387 1387
1388 status = gpiochip_init_valid_mask(chip);1388 status = gpiochip_init_valid_mask(chip);
1389 if (status)1389 if (status)
1390 goto err_remove_chip;1390 goto err_remove_of_chip;
1391 1391
1392 for (i = 0; i < chip->ngpio; i++) {1392 for (i = 0; i < chip->ngpio; i++) {
1393 struct gpio_desc *desc = &gdev->descs[i];1393 struct gpio_desc *desc = &gdev->descs[i];
@@ -1415,14 +1415,18 @@ int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data, · 21 unmodified lines
1415 if (gpiolib_initialized) {1415 if (gpiolib_initialized) {
1416 status = gpiochip_setup_dev(gdev);1416 status = gpiochip_setup_dev(gdev);
1417 if (status)1417 if (status)
1418 goto err_remove_chip;1418 goto err_remove_acpi_chip;
1419 }1419 }
1420 return 0;1420 return 0;
1421 1421
1422err_remove_chip:1422err_remove_acpi_chip:
1423 acpi_gpiochip_remove(chip);1423 acpi_gpiochip_remove(chip);
1424err_remove_of_chip:
1424 gpiochip_free_hogs(chip);1425 gpiochip_free_hogs(chip);
1425 of_gpiochip_remove(chip);1426 of_gpiochip_remove(chip);
1427err_remove_chip:
1428 gpiochip_irqchip_remove(chip);
1429err_free_gpiochip_mask:
1426 gpiochip_free_valid_mask(chip);1430 gpiochip_free_valid_mask(chip);
1427err_remove_irqchip_mask:1431err_remove_irqchip_mask:
1428 gpiochip_irqchip_free_valid_mask(chip);1432 gpiochip_irqchip_free_valid_mask(chip);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t