Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2546320lqb; Tue, 28 May 2024 03:27:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUISy5VpgXlR4uZ32/RS396L6Z379uHkjeotyN4929br4ZNxUqLThBpu2++n9cLCV2JRjoaNxtJSPrlVfP6mWryvMiQCzkLdeNerrdEGQ== X-Google-Smtp-Source: AGHT+IFNyqHm3NcDA3axB2XU3eXVJrg/X0DzMfNu98YT8A/aOaemY3Hx/HN4vKocIJ9J9S8wwYns X-Received: by 2002:a05:620a:8504:b0:792:9d4c:6433 with SMTP id af79cd13be357-794ab1124bdmr1217085085a.51.1716892077789; Tue, 28 May 2024 03:27:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716892077; cv=pass; d=google.com; s=arc-20160816; b=T2MI7/sNmJeavTQNRhWoNmfTdqjq1UfUGViNimybWWn1EBvmSUlwFKv/FC9jvm31X2 lnUVswS/NENizIWU4gmyzhaa1NL8cD4Ly7Q+vvBNajXjQgvs+Y+LyJ6cnw75Hmpw/MEi 0wsucDIe+hy3a5ksoEsS6VAlFxF3x4/Zm7ypj1ujvEFmC+apO5xqASLGqd17nh8Ee/Fc LY+jeksD5C6Y2jk6uGKeo4lQzLxPPSS2obQ0tGa4LDFXypIPYrk7jsE0xdTkZfH6LPeR weG1Nj6AROEeNpcAA3l9/r7s+JIKa6tNO9iS/yTSblEPZW5Kw0HRNPEd1IPWY/q1cFk0 l3xw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=UHiZYWXrofKoYpcsN44FNojdfn1zmpEvKvGOL6VpMcE=; fh=o0a3dWUvskYrsDYGfnbSoQNBUqWxBaIoxtMWPa6oat8=; b=K/p/lSTg2F9stRePmPWByQlL8mplmjwPwymchnb8LrfIa3TXS32Zb6KkvsWoOPf2Bp smshdEKpHqal4nx8/QCuZrcR0pzlqH+itI9H6X1WP6R9UKBiC0kXmTcZLTy+daHMEvZa 5Vd2zT15On2yjEq32AaOD1jSFbc6iU7vuPAGFhuLnl0highMH4iO65n2S5BKfxhgdZQ0 6ECBYvx78NegRUHv+amI18Ns6jm5tDCD08VeBituh+01wJh51B6qVO6qcrsWYM1HJEbb V5rZMsI3yXqceUXRBzb2/M+gifNmHfDq6i7sALyyUdofvxrV5EeyXwiKJuwPvH7eIRcy DEIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-192116-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192116-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794abcab70fsi986512285a.29.2024.05.28.03.27.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 03:27:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192116-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-192116-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192116-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9E9751C237DE for ; Tue, 28 May 2024 10:27:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7CE4C16C6A5; Tue, 28 May 2024 10:27:25 +0000 (UTC) Received: from fgw22-7.mail.saunalahti.fi (fgw22-7.mail.saunalahti.fi [62.142.5.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CB1816B740 for ; Tue, 28 May 2024 10:27:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.83 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716892045; cv=none; b=bATcfAqDRO3ZCEFqc5cGWY+kozKH8r+GlumJWT4Shc3vlNJbmzgG4SnLzgQXnr5mGRl5rlaUsiEppIWIjdqVEV47yTAs7DPfQI9yP9Nlc2obo55CQrpuoluQu8MAEU1sp1ybawVKRizgoBxRa8cGxycsBkPJUxr45vUG2y2c85s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716892045; c=relaxed/simple; bh=BNnZ7gYxVPG+zhntrXhysWWcp6Wfp3QG2SUsNPXf5hg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fXEyNNfmlZWAYk1xX8OBCCIP5iQZ2sswcg1IOYOxeOqEV5Fuz58FfSoH5bXiYPtLysWOVpHyV6uSEAELXNPpYioW/FGT0SgK5Rm/CCeXMYwsafZ44nyBR6npgmPKfthQt964/Os7D62iHnzBKRQi1dPd4oz5mddQ7rRMOzCgljs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-26-230.elisa-laajakaista.fi [88.113.26.230]) by fgw21.mail.saunalahti.fi (Halon) with ESMTP id dd9a6722-1cdc-11ef-aaf4-005056bdd08f; Tue, 28 May 2024 13:27:21 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "Rafael J. Wysocki" , Guanbing Huang , Guanbing Huang , Christoph Hellwig Subject: [PATCH v2 2/2] PNP: Hide pnp_bus_type from the non-PNP code Date: Tue, 28 May 2024 13:25:03 +0300 Message-ID: <20240528102708.1451343-3-andy.shevchenko@gmail.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240528102708.1451343-1-andy.shevchenko@gmail.com> References: <20240528102708.1451343-1-andy.shevchenko@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The pnp_bus_type is defined only when CONFIG_PNP=y, while being not guarded by ifdeffery in the header. Moreover, it's not used outside of the PNP code. Move it to the internal header to make sure no-one will try to (ab)use it. Signed-off-by: Andy Shevchenko --- drivers/pnp/base.h | 1 + include/linux/pnp.h | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pnp/base.h b/drivers/pnp/base.h index e74a0f6a3157..4e80273dfb1e 100644 --- a/drivers/pnp/base.h +++ b/drivers/pnp/base.h @@ -6,6 +6,7 @@ extern struct mutex pnp_lock; extern const struct attribute_group *pnp_dev_groups[]; +extern const struct bus_type pnp_bus_type; int pnp_register_protocol(struct pnp_protocol *protocol); void pnp_unregister_protocol(struct pnp_protocol *protocol); diff --git a/include/linux/pnp.h b/include/linux/pnp.h index a8def1cea32c..7f2ff95d2deb 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h @@ -435,8 +435,6 @@ struct pnp_protocol { #define protocol_for_each_dev(protocol, dev) \ list_for_each_entry(dev, &(protocol)->devices, protocol_list) -extern const struct bus_type pnp_bus_type; - #if defined(CONFIG_PNP) /* device management */ -- 2.45.1