From patchwork Thu Mar 10 08:57:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 63741 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp315360lbc; Thu, 10 Mar 2016 00:58:17 -0800 (PST) X-Received: by 10.98.66.155 with SMTP id h27mr3300530pfd.91.1457600297424; Thu, 10 Mar 2016 00:58:17 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y64si4630411pfi.87.2016.03.10.00.58.17; Thu, 10 Mar 2016 00:58:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753009AbcCJI6Q (ORCPT + 4 others); Thu, 10 Mar 2016 03:58:16 -0500 Received: from mail-pa0-f53.google.com ([209.85.220.53]:35407 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753677AbcCJI6P (ORCPT ); Thu, 10 Mar 2016 03:58:15 -0500 Received: by mail-pa0-f53.google.com with SMTP id td3so35721042pab.2 for ; Thu, 10 Mar 2016 00:58:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=LF3wTZ8CF01rDnW2o3SYtqCncQMqQHDf24wP6p4DmmQ=; b=cfErlHbl3saERbJELxprL/cmGIQZxvNKEm1YPSQK2Fux/rscbgC+enbKsmFsXVhYSn L4GkKjWIOVHBszapStqEoIMH0RZVYGwOa3ZCaji/abCOjnSaEygNz0u1NgDVv9V1Z2c6 UhwbfHsWbdBrEh3OX92efTvMZRM4sbmIX84FE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=LF3wTZ8CF01rDnW2o3SYtqCncQMqQHDf24wP6p4DmmQ=; b=AdcNA37y6vxZA5mOjFs9H3Kvb4FOd65SdzuiMo9nOO5eqv0SlL/VnvvwTjX6yef9/z TblbP0Hio2n8R/7Sc99NUaFMDFEgq+B1Yev6YCOCStAXZwEs0g/PJhEZuZkzvHRXnyW/ y2YNk+WO7PQv2fwFaTCb2497ooq9WnfSt1lTrhcnP5KCT9tKgyo8AsI53FbLWX6ZZjgI /LJB4CqOqeEmOtZPZqO7MykTyPa60BWvk52v+iJHxsSODJS3Kc4YmZXcHiBBffIoBg2+ sxeMLZ9s+NmepQxkKZl1zsiGqO/hbnCc4OiHTQmKYDap9zvkF0SFTl04snERUPJplcXS xapw== X-Gm-Message-State: AD7BkJKGQXKIL/vflPXsph29Z18oShnunrpyGW+5mJ83+tfXiBuc2KYg5f/fdxIhNf5i3f1U X-Received: by 10.66.193.226 with SMTP id hr2mr3343224pac.20.1457600295084; Thu, 10 Mar 2016 00:58:15 -0800 (PST) Received: from 172-4-141-116.cgcwfunction (110-170-137-253.static.asianet.co.th. [110.170.137.253]) by smtp.gmail.com with ESMTPSA id dy6sm3741900pab.48.2016.03.10.00.58.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Mar 2016 00:58:14 -0800 (PST) From: Linus Walleij To: linux-gpio@vger.kernel.org, Alexandre Courbot , Johan Hovold , Michael Welling , Markus Pargmann , Arnd Bergmann Cc: Bamvor Jian Zhang , Grant Likely , Linus Walleij Subject: [PATCH] gpio: uapi: use 0xB4 as ioctl() major Date: Thu, 10 Mar 2016 15:57:58 +0700 Message-Id: <1457600278-30124-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.3 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The previous 'o' is in conflict and not very orderly assigned. We want to select an ioctl() major that does not conflict with the existining ones. Add the new reserved major (0xB4) to Documentation/ioctl/ioctl-number.txt Fixes: 3c702e9987e2 ("gpio: add a userspace chardev ABI for GPIOs") Suggested-by: Arnd Bergmann Signed-off-by: Linus Walleij --- This fixes a serious number space collission in the ABI, because of my incompetence. Ideally I would augment the original commit, but at this point I can not rebase my tree. The merged end result will be OK. --- Documentation/ioctl/ioctl-number.txt | 1 + include/uapi/linux/gpio.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt index 91261a32a573..9369d3b0f09a 100644 --- a/Documentation/ioctl/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt @@ -319,6 +319,7 @@ Code Seq#(hex) Include File Comments 0xB1 00-1F PPPoX 0xB3 00 linux/mmc/ioctl.h +0xB4 00-0F linux/gpio.h 0xC0 00-0F linux/usb/iowarrior.h 0xCA 00-0F uapi/misc/cxl.h 0xCA 80-8F uapi/scsi/cxlflash_ioctl.h diff --git a/include/uapi/linux/gpio.h b/include/uapi/linux/gpio.h index dfe8ade2742d..d0a3cac72250 100644 --- a/include/uapi/linux/gpio.h +++ b/include/uapi/linux/gpio.h @@ -52,7 +52,7 @@ struct gpioline_info { char consumer[32]; }; -#define GPIO_GET_CHIPINFO_IOCTL _IOR('o', 0x01, struct gpiochip_info) -#define GPIO_GET_LINEINFO_IOCTL _IOWR('o', 0x02, struct gpioline_info) +#define GPIO_GET_CHIPINFO_IOCTL _IOR(0xB4, 0x01, struct gpiochip_info) +#define GPIO_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x02, struct gpioline_info) #endif /* _UAPI_GPIO_H_ */