get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/808947/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 808947,
    "url": "http://patchwork.ozlabs.org/api/patches/808947/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-tegra/patch/20170901185736.28051-3-thierry.reding@gmail.com/",
    "project": {
        "id": 21,
        "url": "http://patchwork.ozlabs.org/api/projects/21/?format=api",
        "name": "Linux Tegra Development",
        "link_name": "linux-tegra",
        "list_id": "linux-tegra.vger.kernel.org",
        "list_email": "linux-tegra@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170901185736.28051-3-thierry.reding@gmail.com>",
    "list_archive_url": null,
    "date": "2017-09-01T18:57:22",
    "name": "[02/16] gpio: Move irqchip into struct gpio_irq_chip",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "4700324bf17e0904c162115d1d67ed7a646ee626",
    "submitter": {
        "id": 26234,
        "url": "http://patchwork.ozlabs.org/api/people/26234/?format=api",
        "name": "Thierry Reding",
        "email": "thierry.reding@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-tegra/patch/20170901185736.28051-3-thierry.reding@gmail.com/mbox/",
    "series": [
        {
            "id": 1099,
            "url": "http://patchwork.ozlabs.org/api/series/1099/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-tegra/list/?series=1099",
            "date": "2017-09-01T18:57:20",
            "name": "gpio: Tight IRQ chip integration and banked infrastructure",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/1099/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/808947/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/808947/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<linux-tegra-owner@vger.kernel.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-tegra-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"mNLaFh1e\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xkT5T2Xvnz9sQl\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  2 Sep 2017 04:57:49 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752387AbdIAS5q (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tFri, 1 Sep 2017 14:57:46 -0400",
            "from mail-wm0-f66.google.com ([74.125.82.66]:37020 \"EHLO\n\tmail-wm0-f66.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752327AbdIAS5n (ORCPT\n\t<rfc822; linux-tegra@vger.kernel.org>); Fri, 1 Sep 2017 14:57:43 -0400",
            "by mail-wm0-f66.google.com with SMTP id x189so953259wmg.4;\n\tFri, 01 Sep 2017 11:57:42 -0700 (PDT)",
            "from localhost\n\t(p200300E41BD6D60076D02BFFFE273F51.dip0.t-ipconnect.de.\n\t[2003:e4:1bd6:d600:76d0:2bff:fe27:3f51])\n\tby smtp.gmail.com with ESMTPSA id\n\tu22sm576634wrf.15.2017.09.01.11.57.40\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tFri, 01 Sep 2017 11:57:40 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=pwt9NqqDygjIyVg0Beg8bhmsbCPHoTn2TPDBvd6YF6E=;\n\tb=mNLaFh1ed/RcT5z4tDEQnNAM0GflySY8Uy8BHLJiRlMI+ktPEMSFFiu3LgmkAAal8L\n\tFfGqd6LKPdTaz6GEMwp8g3xPZ9E+X2rYD+fErM4lVM6domXp6A/tRdi3nAue5xBs8tJ2\n\tNItVTZvFWub4Egah78UzOP8ryrtY4AdFsZV3J8CPY8CFg+YjJbxESvBJ/6YoMH6BADEJ\n\tQ1tgjmyYhpBZRAz+jc6HvlOA8Np15/DzwGw+qgAu82Nn37UT0KSgFyXf8Ol0MHGe1xVv\n\tOBw3cDJSBJ2Z19yAC5bxomv4UcZAMKxXVJJjlaJATIFfv9oqg0MJcvv6Ru4s27d+wZdN\n\tVKOg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=pwt9NqqDygjIyVg0Beg8bhmsbCPHoTn2TPDBvd6YF6E=;\n\tb=LnU1XFgpDZc1uV3ZysCwx4vDrrOE9j1I37rV3ZMJQPiS9Oy4ut5CKkTCFUdV6JEuW5\n\tcerES/Ke8ZQp5kfgZaIH+oQZciTrpWKF72BSPkzRp56X/t65rWOG2WRYL+FYn4kLOs6a\n\tdy/zHECUF/APwI8L0YFG1wmkkMMGLCWNnvLqB7kmEfXf/eEJWFs4K7t+pyDSFBepXuHe\n\tE1401HXMvPpdDb/bgNQINWL5mnAuOG3fUCMj/BMN/FMt5RUInbbFa5OcOhkxZl9P6rWE\n\to9zGsYGXckajnGHl8XSfvaQmjCeVeBeudts/G44EJcW8KNEbQDeyu5RF55B55UrC6htM\n\taRfw==",
        "X-Gm-Message-State": "AHPjjUh3TXoGBMBpSGeS4sHU+JX8ngmbF7vCc+N++RniOAZuABMk0HaO\n\tE+/ZJiEC/VhkxA==",
        "X-Google-Smtp-Source": "ADKCNb5bCwryWAKgiRULYBPLoOtPeAaSaN1F/QPXlTTejmLkXZ5yqwKwCOEZO5m1MHl82Q/3mxh62A==",
        "X-Received": "by 10.28.140.196 with SMTP id o187mr1278056wmd.160.1504292261649;\n\tFri, 01 Sep 2017 11:57:41 -0700 (PDT)",
        "From": "Thierry Reding <thierry.reding@gmail.com>",
        "To": "Linus Walleij <linus.walleij@linaro.org>",
        "Cc": "Jonathan Hunter <jonathanh@nvidia.com>, linux-gpio@vger.kernel.org,\n\tlinux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org",
        "Subject": "[PATCH 02/16] gpio: Move irqchip into struct gpio_irq_chip",
        "Date": "Fri,  1 Sep 2017 20:57:22 +0200",
        "Message-Id": "<20170901185736.28051-3-thierry.reding@gmail.com>",
        "X-Mailer": "git-send-email 2.13.3",
        "In-Reply-To": "<20170901185736.28051-1-thierry.reding@gmail.com>",
        "References": "<20170901185736.28051-1-thierry.reding@gmail.com>",
        "Sender": "linux-tegra-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<linux-tegra.vger.kernel.org>",
        "X-Mailing-List": "linux-tegra@vger.kernel.org"
    },
    "content": "From: Thierry Reding <treding@nvidia.com>\n\nIn order to consolidate the multiple ways to associate an IRQ chip with\na GPIO chip, move more fields into the new struct gpio_irq_chip.\n\nSigned-off-by: Thierry Reding <treding@nvidia.com>\n---\n drivers/gpio/gpiolib.c      | 18 +++++++++---------\n include/linux/gpio/driver.h | 14 ++++++++++++--\n 2 files changed, 21 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c\nindex abc0f72e9950..4058adde7dc6 100644\n--- a/drivers/gpio/gpiolib.c\n+++ b/drivers/gpio/gpiolib.c\n@@ -1656,7 +1656,7 @@ int gpiochip_irq_map(struct irq_domain *d, unsigned int irq,\n \t * category than their parents, so it won't report false recursion.\n \t */\n \tirq_set_lockdep_class(irq, chip->lock_key);\n-\tirq_set_chip_and_handler(irq, chip->irqchip, chip->irq_handler);\n+\tirq_set_chip_and_handler(irq, chip->irq.chip, chip->irq_handler);\n \t/* Chips that use nested thread handlers have them marked */\n \tif (chip->irq_nested)\n \t\tirq_set_nested_thread(irq, 1);\n@@ -1729,7 +1729,7 @@ static int gpiochip_to_irq(struct gpio_chip *chip, unsigned offset)\n  */\n static int gpiochip_add_irqchip(struct gpio_chip *gpiochip)\n {\n-\tstruct irq_chip *irqchip = gpiochip->irqchip;\n+\tstruct irq_chip *irqchip = gpiochip->irq.chip;\n \tconst struct irq_domain_ops *ops;\n \tstruct device_node *np;\n \tunsigned int type;\n@@ -1858,7 +1858,7 @@ static void gpiochip_irqchip_remove(struct gpio_chip *gpiochip)\n \t\tirq_set_handler_data(gpiochip->irq_chained_parent, NULL);\n \t}\n \n-\tif (gpiochip->irqchip) {\n+\tif (gpiochip->irq.chip) {\n \t\tstruct gpio_irq_chip *irq = &gpiochip->irq;\n \t\tunsigned int i;\n \n@@ -1879,10 +1879,10 @@ static void gpiochip_irqchip_remove(struct gpio_chip *gpiochip)\n \t\tirq_domain_remove(gpiochip->irqdomain);\n \t}\n \n-\tif (gpiochip->irqchip) {\n-\t\tgpiochip->irqchip->irq_request_resources = NULL;\n-\t\tgpiochip->irqchip->irq_release_resources = NULL;\n-\t\tgpiochip->irqchip = NULL;\n+\tif (gpiochip->irq.chip) {\n+\t\tgpiochip->irq.chip->irq_request_resources = NULL;\n+\t\tgpiochip->irq.chip->irq_release_resources = NULL;\n+\t\tgpiochip->irq.chip = NULL;\n \t}\n \n \tgpiochip_irqchip_free_valid_mask(gpiochip);\n@@ -1957,7 +1957,7 @@ int gpiochip_irqchip_add_key(struct gpio_chip *gpiochip,\n \t\ttype = IRQ_TYPE_NONE;\n \t}\n \n-\tgpiochip->irqchip = irqchip;\n+\tgpiochip->irq.chip = irqchip;\n \tgpiochip->irq_handler = handler;\n \tgpiochip->irq_default_type = type;\n \tgpiochip->to_irq = gpiochip_to_irq;\n@@ -1966,7 +1966,7 @@ int gpiochip_irqchip_add_key(struct gpio_chip *gpiochip,\n \t\t\t\t\tgpiochip->ngpio, first_irq,\n \t\t\t\t\t&gpiochip_domain_ops, gpiochip);\n \tif (!gpiochip->irqdomain) {\n-\t\tgpiochip->irqchip = NULL;\n+\t\tgpiochip->irq.chip = NULL;\n \t\treturn -EINVAL;\n \t}\n \ndiff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h\nindex 6100b171817e..974247646886 100644\n--- a/include/linux/gpio/driver.h\n+++ b/include/linux/gpio/driver.h\n@@ -25,6 +25,13 @@ struct module;\n  */\n struct gpio_irq_chip {\n \t/**\n+\t * @chip:\n+\t *\n+\t * GPIO IRQ chip implementation, provided by GPIO driver.\n+\t */\n+\tstruct irq_chip *chip;\n+\n+\t/**\n \t * @domain_ops:\n \t *\n \t * Table of interrupt domain operations for this IRQ chip.\n@@ -69,6 +76,11 @@ struct gpio_irq_chip {\n \t */\n \tunsigned int *map;\n };\n+\n+static inline struct gpio_irq_chip *to_gpio_irq_chip(struct irq_chip *chip)\n+{\n+\treturn container_of(chip, struct gpio_irq_chip, chip);\n+}\n #endif\n \n /**\n@@ -132,7 +144,6 @@ struct gpio_irq_chip {\n  *\tsafely.\n  * @bgpio_dir: shadowed direction register for generic GPIO to clear/set\n  *\tdirection safely.\n- * @irqchip: GPIO IRQ chip impl, provided by GPIO driver\n  * @irqdomain: Interrupt translation domain; responsible for mapping\n  *\tbetween GPIO hwirq number and linux irq number\n  * @irq_base: first linux IRQ number assigned to GPIO IRQ chip (deprecated)\n@@ -215,7 +226,6 @@ struct gpio_chip {\n \t * With CONFIG_GPIOLIB_IRQCHIP we get an irqchip inside the gpiolib\n \t * to handle IRQs for most practical cases.\n \t */\n-\tstruct irq_chip\t\t*irqchip;\n \tstruct irq_domain\t*irqdomain;\n \tunsigned int\t\tirq_base;\n \tirq_flow_handler_t\tirq_handler;\n",
    "prefixes": [
        "02/16"
    ]
}