From patchwork Thu Jan 4 13:39:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 13511119 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D92A7C47074 for ; Thu, 4 Jan 2024 13:40:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:From:To: Subject:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=NnODjb9uet/wGLXCEkG6svx1TMwyEMjNJrAE0F++M7w=; b=CZ3qgfWnRR2L8f WJVqjUqPW9h1mdDeqTHp2x4tZO2UvUFz45LM2Xc0mWNYNnBEIZ57Ts3EHX6J3hhll0L2paFBK2R8/ dppXwoWIP5yzm3RIdCY4QtvS0BfAR9M+1MuIb+fS5LAMmXDlGEzC1OIVrVtYcbSfA7oBd8C/+/yHT T3zePZaFXt18u7YTBK10Z3s2DTWNF6Y8vnbXmbyMDBShaYeWlIOLHL3wkzH90DyT1u3iS/ob0TuLU VQAoNrQ3VsL8PqZc8/55xmaXwxl3K8dm/iXkmM3o14WskZZlEMQV8YJf1rIdFCJkpM1Yewsd1JzQw K40YAsv5ROjCPX3Hc4vg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLNwn-00EBqc-32; Thu, 04 Jan 2024 13:39:45 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLNwk-00EBo6-0a for linux-arm-kernel@lists.infradead.org; Thu, 04 Jan 2024 13:39:44 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 5B9B8CE1B58; Thu, 4 Jan 2024 13:39:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC4C3C433C8; Thu, 4 Jan 2024 13:39:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1704375576; bh=Hzg/zve/h77DPmbs/P7uGcK0eLlGT7wMjvvdJNZGaeU=; h=Subject:To:From:Date:From; b=hd6SbgDBr9dSxvgJH3JmAxiKmQIwNS0ublts8ynAPy3O7dWocOxfYOIv4SvV3z5YH kjwwYYb3TnwsShv+FAyIUrG2I0AnjdeVOHsFh26rNTJ1TN0YZay4T7zgPe/1ntHEoK WwlwrXCyicvG/BhaeLPVs7qw0obFG3dcVrpF+YOk= Subject: patch "locomo: make locomo_bus_type constant and static" added to char-misc-testing To: gregkh@linuxfoundation.org,arnd@arndb.de,linux-arm-kernel@lists.infradead.org,linux@armlinux.org.uk,rdunlap@infradead.org,u.kleine-koenig@pengutronix.de From: Date: Thu, 04 Jan 2024 14:39:25 +0100 Message-ID: <2024010425-bullwhip-whiny-9afb@gregkh> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240104_053942_571237_42341D7D X-CRM114-Status: GOOD ( 21.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is a note to let you know that I've just added the patch titled locomo: make locomo_bus_type constant and static to my char-misc git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git in the char-misc-testing branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will be merged to the char-misc-next branch sometime soon, after it passes testing, and the merge window is open. If you have any questions about this process, please let me know. From 2e9bf5cc912365d20e3255a0779f5516157b923e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 19 Dec 2023 19:33:06 +0100 Subject: locomo: make locomo_bus_type constant and static MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that the driver core can properly handle constant struct bus_type, move the locomo_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. It's also never used outside of arch/arm/common/locomo.c so make it static and don't export it as no one is using it. Cc: Russell King Cc: Arnd Bergmann Cc: Uwe Kleine-König Cc: Randy Dunlap Cc: Acked-by: Uwe Kleine-König Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/2023121905-idiom-opossum-1ba3@gregkh Signed-off-by: Greg Kroah-Hartman --- arch/arm/common/locomo.c | 4 +++- arch/arm/include/asm/hardware/locomo.h | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index 70480dd9e96d..6d0c9f7268ba 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c @@ -68,6 +68,8 @@ struct locomo { #endif }; +static const struct bus_type locomo_bus_type; + struct locomo_dev_info { unsigned long offset; unsigned long length; @@ -842,7 +844,7 @@ static void locomo_bus_remove(struct device *dev) drv->remove(ldev); } -struct bus_type locomo_bus_type = { +static const struct bus_type locomo_bus_type = { .name = "locomo-bus", .match = locomo_match, .probe = locomo_bus_probe, diff --git a/arch/arm/include/asm/hardware/locomo.h b/arch/arm/include/asm/hardware/locomo.h index aaaedafef7cc..9fd9ad5d9202 100644 --- a/arch/arm/include/asm/hardware/locomo.h +++ b/arch/arm/include/asm/hardware/locomo.h @@ -158,8 +158,6 @@ #define LOCOMO_LPT_TOH(TOH) ((TOH & 0x7) << 4) #define LOCOMO_LPT_TOL(TOL) ((TOL & 0x7)) -extern struct bus_type locomo_bus_type; - #define LOCOMO_DEVID_KEYBOARD 0 #define LOCOMO_DEVID_FRONTLIGHT 1 #define LOCOMO_DEVID_BACKLIGHT 2