Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2270065rdb; Mon, 20 Nov 2023 06:49:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IEJnrgFKqxsSUSCUFguLShbCw1LhifsjtA0ElfjXLLhEbI7H26XaOH1ZVwSnOCQ9QTSz1cd X-Received: by 2002:a17:90b:4a8a:b0:280:1d67:16a6 with SMTP id lp10-20020a17090b4a8a00b002801d6716a6mr8069304pjb.34.1700491755230; Mon, 20 Nov 2023 06:49:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700491755; cv=none; d=google.com; s=arc-20160816; b=ygXj48CIm/3bbXCSx7Yk39zs9JxXiBaDgcuL5ha4rrWkXVb2E/d4Ii6P7MDaaXNvMa qTOkESw8/E3PfeeQLTPenLyDlOUaKXpbc8qHs9wb00+MzGuS9y0y7pOECJePu5+BhLhY DtRRvi2Kv9UWQ8zGWuCzcA8CovwRi1jqjESDeKwJPQL4N1dwUjXpprpbhWDEzfdSGJmp 9xNDBOnCXOZiMiXXJPTbY/Tr1cF//gINUbEXfmPL+m+RYtEouOJ21QyYQX8BVhkWoZAb 5yRJeVDIStmCC9875Ngh5xCkRvl24O8PQV05OTIocm3K/zieUazpnbkr5nFTihr+gGdQ wlew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XIqmL0KpmYvt81hg8nhYz5zfzQJMFgVdVAhAhbHy1T0=; fh=g3amdiifXhwL/mTWljo4oOX/iLvH3RCBC8SWsJqOWek=; b=werYHfydEPjHXrM62s8KWMXBBP9O35IuyU4+ZOYtMNaLsvs+sxHAUFPh+hay7utGIK QJpkl3urB129B5soVGFlGQ2tib2DmgAUQEz502lseeIhf+8+ppfSjHIss+6QoG6Bq4K9 /0pRVf73ggcpIobvQfkVQw9gZSR1nUkIP3+O+ELyKIG3uuWc6Y75JSF43qIDOHP8KpJA F1F5R3BlHvnTc/5VxLZgDkUB/X36YD06Km3MKhbkkWde+m9/k9Lzn/0L6RD0omkTK0+A B8/a2WJhcDK/TPWijMV5ej4THikRrD0zmxSbpOS7qONmUjztYEEQ3H0t09nUmDsZ2ShY I+cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Msqjec5h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id ls8-20020a17090b350800b002850d9700a8si5649186pjb.21.2023.11.20.06.49.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 06:49:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Msqjec5h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id CAB0180A9DD8; Mon, 20 Nov 2023 06:48:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234115AbjKTOr7 (ORCPT + 99 others); Mon, 20 Nov 2023 09:47:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233423AbjKTOrI (ORCPT ); Mon, 20 Nov 2023 09:47:08 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8EBED69; Mon, 20 Nov 2023 06:46:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700491619; x=1732027619; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uLVeF/uTk0+x9zvX73n0BK9nE9dqOP8VDpiHMj0UVU0=; b=Msqjec5h2I/AYlFd6Y/HkcnA92o0Cg0jOG3aRRcSTM4WB/Tn31xM9x+V op3PQ6Y4IS8ln20hRUPw+2sbuCQuE3+1dNJbrNlTYuZrKOXq7aXUh+jyY Q7xt07v39DvyuM+QItLzZd8Pn0gCV7GECE7e8S9U2j2LZFWVT1Pbq12YQ zvDUa/nXj6LKWZTb8Z8UHFpRw7pQdI/ydwvJHkD1MjPVAq356NPnjevEY zRDK4lpS/zfFlr+4daLUuA67AH3ZlcIfXqCUux8JWCVPclG0ic/sk/3ra RswIzHbGb63pNGzqSiFHjC4cTZfyLKBLMeEiI9qY1CHDRAFOR3slgFgUR g==; X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="455956510" X-IronPort-AV: E=Sophos;i="6.04,214,1695711600"; d="scan'208";a="455956510" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2023 06:46:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="801193204" X-IronPort-AV: E=Sophos;i="6.04,214,1695711600"; d="scan'208";a="801193204" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 20 Nov 2023 06:46:53 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id DA4AC497; Mon, 20 Nov 2023 16:46:44 +0200 (EET) From: Andy Shevchenko To: Mario Limonciello , Jarkko Nikula , Herbert Xu , Andy Shevchenko , Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Jan Dabros , Andi Shyti , Philipp Zabel Subject: [PATCH v4 16/24] i2c: designware: Move exports to I2C_DW namespaces Date: Mon, 20 Nov 2023 16:41:58 +0200 Message-ID: <20231120144641.1660574-17-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20231120144641.1660574-1-andriy.shevchenko@linux.intel.com> References: <20231120144641.1660574-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 20 Nov 2023 06:48:57 -0800 (PST) Reduce scope of the I²C DesignWare driver exports to I2C_DW namespaces. This will prevent abuse of the symbols and clean up global namespace. Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-designware-common.c | 2 ++ drivers/i2c/busses/i2c-designware-master.c | 3 +++ drivers/i2c/busses/i2c-designware-pcidrv.c | 2 ++ drivers/i2c/busses/i2c-designware-platdrv.c | 2 ++ drivers/i2c/busses/i2c-designware-slave.c | 3 +++ 5 files changed, 12 insertions(+) diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c index fb75e9b3d4fc..89b8fa492e26 100644 --- a/drivers/i2c/busses/i2c-designware-common.c +++ b/drivers/i2c/busses/i2c-designware-common.c @@ -28,6 +28,8 @@ #include #include +#define DEFAULT_SYMBOL_NAMESPACE I2C_DW_COMMON + #include "i2c-designware-core.h" static char *abort_sources[] = { diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c index 85dbd0eb5392..0b6576d7f811 100644 --- a/drivers/i2c/busses/i2c-designware-master.c +++ b/drivers/i2c/busses/i2c-designware-master.c @@ -22,6 +22,8 @@ #include #include +#define DEFAULT_SYMBOL_NAMESPACE I2C_DW + #include "i2c-designware-core.h" #define AMD_TIMEOUT_MIN_US 25 @@ -1079,3 +1081,4 @@ EXPORT_SYMBOL_GPL(i2c_dw_probe_master); MODULE_DESCRIPTION("Synopsys DesignWare I2C bus master adapter"); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(I2C_DW_COMMON); diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index 7556e9cbf8d2..a40acc3d9288 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -410,3 +410,5 @@ module_pci_driver(dw_i2c_driver); MODULE_AUTHOR("Baruch Siach "); MODULE_DESCRIPTION("Synopsys DesignWare PCI I2C bus adapter"); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(I2C_DW); +MODULE_IMPORT_NS(I2C_DW_COMMON); diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index b275a1b19eec..6b1a26afc278 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -471,3 +471,5 @@ module_exit(dw_i2c_exit_driver); MODULE_AUTHOR("Baruch Siach "); MODULE_DESCRIPTION("Synopsys DesignWare I2C bus adapter"); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(I2C_DW); +MODULE_IMPORT_NS(I2C_DW_COMMON); diff --git a/drivers/i2c/busses/i2c-designware-slave.c b/drivers/i2c/busses/i2c-designware-slave.c index 2e079cf20bb5..70d183fa3bff 100644 --- a/drivers/i2c/busses/i2c-designware-slave.c +++ b/drivers/i2c/busses/i2c-designware-slave.c @@ -16,6 +16,8 @@ #include #include +#define DEFAULT_SYMBOL_NAMESPACE I2C_DW + #include "i2c-designware-core.h" static void i2c_dw_configure_fifo_slave(struct dw_i2c_dev *dev) @@ -279,3 +281,4 @@ EXPORT_SYMBOL_GPL(i2c_dw_probe_slave); MODULE_AUTHOR("Luis Oliveira "); MODULE_DESCRIPTION("Synopsys DesignWare I2C bus slave adapter"); MODULE_LICENSE("GPL v2"); +MODULE_IMPORT_NS(I2C_DW_COMMON); -- 2.43.0.rc1.1.gbec44491f096