Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2010110ybh; Sun, 8 Mar 2020 19:28:59 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu6ypwJkXUuan3d1tqK43FD/ju4aoFNSj9YKLqAQzS5ah2tXVvL/gzV2txrABbJzHfxhGIX X-Received: by 2002:aca:37c3:: with SMTP id e186mr10287818oia.155.1583720939539; Sun, 08 Mar 2020 19:28:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583720939; cv=none; d=google.com; s=arc-20160816; b=rk8phpwDyEifZEgkLINZayAgYZoIc3tIFFj1Y/0LKn+emKDtkqstLK6WQaP5up6DcQ dWABhTJVlJ44V5TyevIPU9huIuCfd0tmgYXKApyA/55N1/ucQhaqd5Ju1PWJCay98CzZ 6GLtdMwEBGcxIBW1HwIZrFf5ndbjw0rq1AC1ugbAR1DSBqFpTW+fxXVUCUXCfxsODjvk wKM5BCeHGZmvRTXmq96EBeichKmX6su/aW8cnzjwP6XW09Kub4CIz0AnGUSxZEy8GyRL W+OnKMdJV7CkpNiROv5PbhsKSZsWd3iBzFZ5ozjId77OZBu4lQ8c+rEtc1K7HvR7sHD7 tnew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=T3Z1bNGuCV9o6RzKcLSsD5DNO7+IpTMMs5GirpLlnjk=; b=AdPGncCZSh9KO8C20jd3zgedisojrEwtVZMVv//yrtiCD8Ttsp64GOgpk4/npIysq9 Wkms6S03qRNk8Qqza8eLqqspyhfkgB8OmrHDcEC6EitVPXQgKnaTx32ZN4vwMRmlGGbn Fwhs6Up8CzYW2R4rVTddd9yTj0UKdKO7krkZDw7nf1VZp/HTnU7GalzL4hQNx11KlWzp 6vBDNj2KtFcZLsS/p5bXJZpcVZrKzNBfUdzmcYqTcMZn+1sHydxwUN7SzHwGtcTNm+i/ hS35fuMShrPvD3fPO43Bcqujg2BtLEz5kBrHoDsKJKc3/D5tSbWf5bmk+aouwfkBEJln vIzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uO1xIZZa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4si929809oig.197.2020.03.08.19.28.47; Sun, 08 Mar 2020 19:28:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uO1xIZZa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727101AbgCICSV (ORCPT + 99 others); Sun, 8 Mar 2020 22:18:21 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:42943 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726595AbgCICSU (ORCPT ); Sun, 8 Mar 2020 22:18:20 -0400 Received: by mail-pg1-f195.google.com with SMTP id h8so3993114pgs.9 for ; Sun, 08 Mar 2020 19:18:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=T3Z1bNGuCV9o6RzKcLSsD5DNO7+IpTMMs5GirpLlnjk=; b=uO1xIZZauRAYv1JxGtTXYaSTX6oNFJjGo8DcHZTPkmZTW7wTIdIWdGoH3aS3E2uRuF 3PiyR9oC/bFWls43VzbMnSAmEm/uhxr85VXYetX2UUsDn/7yzx1be4beaLhVc/GShO2T y3xOZb+UtZaraR/1mRZPT09sr5/TlSQtoOTJ0HWKaiozNt2AVGYffSsrxbonSPBetzv/ Sfetjk5/nznJW6t4OrDqmsA7PqqRQMrNjA+Dl/yIQU00RANE7hflQuZknu6z9go30nkB BVYWRkXQgz7e4se0i8+IKutRo9pQsi9A/6T6B3nNh9Om+AtqvbV9ifsqWcut7PltX5Om hwhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=T3Z1bNGuCV9o6RzKcLSsD5DNO7+IpTMMs5GirpLlnjk=; b=TUTSgT7a8h4XcoDBNn/Eg3Ll8eKGeWo7rUCDnqFR/zjv4gmYeVX+IPfsjoU5wUtW0k WL/w16BiCBOpHiIqxR4Iz9nup5V4nHiy103X00Bie+5zfZtFIJI8xYu5iXVRph2M4Tk9 BX1dd5ZxPVM9WDw+udA1/bcgpGQnNy2pmNiPcwnLxg1baBL/fBoRyjg6gLtHgy9IbTsE x6Q/UCKdphJIev/oN33o8u8VciVgy4+Vt7cJBUq7JPFLbVy4tOdGKlgnYTBI2DYOljen leFLv4tkNe50yiod8gZBO/q8P9fht4S5J2dwsolrhGzm3kQiflBKhTS6u5E5qZjA91sC niBw== X-Gm-Message-State: ANhLgQ1T72KCI9HxqBHfQ+w+8eioBEWwArtNmEwxdwB9z//ERB6Z8w5b 3VP7UFy9+5c/0BqXc6nli6ucWo/B X-Received: by 2002:a63:180c:: with SMTP id y12mr14784316pgl.120.1583720299290; Sun, 08 Mar 2020 19:18:19 -0700 (PDT) Received: from ZB-PF114XEA.360buyad.local ([103.90.76.242]) by smtp.gmail.com with ESMTPSA id r12sm42394043pgu.93.2020.03.08.19.18.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Mar 2020 19:18:18 -0700 (PDT) From: Zhenzhong Duan To: linux-kernel@vger.kernel.org Cc: jdike@addtoit.com, richard@nod.at, anton.ivanov@cambridgegreys.com, miguel.ojeda.sandonis@gmail.com, willy@haproxy.com, ksenija.stanojevic@gmail.com, arnd@arndb.de, gregkh@linuxfoundation.org, mpm@selenic.com, herbert@gondor.apana.org.au, jonathan@buzzard.org.uk, benh@kernel.crashing.org, davem@davemloft.net, b.zolnierkie@samsung.com, rjw@rjwysocki.net, pavel@ucw.cz, len.brown@intel.com, Zhenzhong Duan , Russell King Subject: [PATCH RFC 2/3] misc: move FLASH_MINOR into miscdevice.h and fix conflicts Date: Mon, 9 Mar 2020 10:17:46 +0800 Message-Id: <20200309021747.626-3-zhenzhong.duan@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200309021747.626-1-zhenzhong.duan@gmail.com> References: <20200309021747.626-1-zhenzhong.duan@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org FLASH_MINOR is used in both drivers/char/nwflash.c and drivers/sbus/char/flash.c with conflict minor numbers. Move all the definitions of FLASH_MINOR into miscdevice.h. Rename FLASH_MINOR for drivers/char/nwflash.c to NWFLASH_MINOR and FLASH_MINOR for drivers/sbus/char/flash.c to SBUS_FLASH_MINOR. Link: https://lore.kernel.org/lkml/20200120221323.GJ15860@mit.edu/t/ Suggested-by: Arnd Bergmann Signed-off-by: Zhenzhong Duan Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Russell King Cc: "David S. Miller" --- arch/arm/include/asm/nwflash.h | 1 - drivers/char/nwflash.c | 2 +- drivers/sbus/char/flash.c | 4 +--- include/linux/miscdevice.h | 2 ++ 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/arm/include/asm/nwflash.h b/arch/arm/include/asm/nwflash.h index 0ec6f07..66b7e68 100644 --- a/arch/arm/include/asm/nwflash.h +++ b/arch/arm/include/asm/nwflash.h @@ -2,7 +2,6 @@ #ifndef _FLASH_H #define _FLASH_H -#define FLASH_MINOR 160 /* MAJOR is 10 - miscdevice */ #define CMD_WRITE_DISABLE 0 #define CMD_WRITE_ENABLE 0x28 #define CMD_WRITE_BASE64K_ENABLE 0x47 diff --git a/drivers/char/nwflash.c b/drivers/char/nwflash.c index a4a0797d..0973c2c 100644 --- a/drivers/char/nwflash.c +++ b/drivers/char/nwflash.c @@ -576,7 +576,7 @@ static void kick_open(void) static struct miscdevice flash_miscdev = { - FLASH_MINOR, + NWFLASH_MINOR, "nwflash", &flash_fops }; diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c index e85a05a..4147d22 100644 --- a/drivers/sbus/char/flash.c +++ b/drivers/sbus/char/flash.c @@ -31,8 +31,6 @@ unsigned long busy; /* In use? */ } flash; -#define FLASH_MINOR 152 - static int flash_mmap(struct file *file, struct vm_area_struct *vma) { @@ -157,7 +155,7 @@ .release = flash_release, }; -static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops }; +static struct miscdevice flash_dev = { SBUS_FLASH_MINOR, "flash", &flash_fops }; static int flash_probe(struct platform_device *op) { diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index 35294c6..41dc10b 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h @@ -30,12 +30,14 @@ #define SUN_OPENPROM_MINOR 139 #define DMAPI_MINOR 140 /* unused */ #define NVRAM_MINOR 144 +#define SBUS_FLASH_MINOR 152 #define SGI_MMTIMER 153 #define PMU_MINOR 154 #define STORE_QUEUE_MINOR 155 /* unused */ #define LCD_MINOR 156 #define AC_MINOR 157 #define BUTTON_MINOR 158 /* Major 10, Minor 158, /dev/nwbutton */ +#define NWFLASH_MINOR 160 /* MAJOR is 10 - miscdevice */ #define ENVCTRL_MINOR 162 #define I2O_MINOR 166 #define UCTRL_MINOR 174 -- 1.8.3.1