From patchwork Fri Jan 5 09:17:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 13511877 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 95370C3DA6E for ; Fri, 5 Jan 2024 09:18:02 +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=1W7tXselZbx8AVj1udV7ySuMCgqBpmevS4Ll2OLY+Kk=; b=vMxZVLXUk6ILZs MENlgqd0eiyuSBSE/4W3Jpi9nBe4RtsVXr8MNcXz6/qcBRHsFujF5RLgsuyfDgYef/uCRZ8iN/EGy iGRwjmSsDL70qYwyXVLyKZves7+CNzRcKllBZWgyqIFZxoVgMt+pUw0zCHehU6wDW3gHZwVUuT2fY IpVtuPXIuvsb8NodkUB9bHLZgOZcx1qjryALEoKxG06KXTb15MEiOQp4M3O9D8g0FxN9D5hAIWI6q tG86vlPqyaEh9221RFR9mjPztn6jReYZDqqZZDpLd/LGtbSYOvWRZdwCnbZoKuCNNPPDk2B3E8zi1 EIo0k6w0CxtadtiidDmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLgKd-00GMXx-1M; Fri, 05 Jan 2024 09:17:35 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLgKZ-00GMUc-2C for linux-arm-kernel@lists.infradead.org; Fri, 05 Jan 2024 09:17:34 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id CE14FCE1353; Fri, 5 Jan 2024 09:17:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8AE2CC433C8; Fri, 5 Jan 2024 09:17:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1704446249; bh=ahO9Z+BtKJnr/1UvWLYGS87OOl4GTMGUlz3lb4yYw2o=; h=Subject:To:From:Date:From; b=GjxWfPUybPI23DgyrbJ/l8bRKCsiy9zNURKAiHmKlyz6BVp1ld2YbAPdcHvopBz2D uzWqnDjPhm3a14CjD86Lf14cZ/2hs96HhMLrMYSlKIqwASuY/I2HycA0ecp0R2JUKY rjlQkvdWwt/wmc71kH74aSggWEoYszjJDK5OJ99E= Subject: patch "locomo: make locomo_bus_type constant and static" added to char-misc-next 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: Fri, 05 Jan 2024 10:17:17 +0100 Message-ID: <2024010517-fidgeting-generic-7e0b@gregkh> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240105_011732_072708_1A4FB2C4 X-CRM114-Status: GOOD ( 21.53 ) 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-next 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 also be merged in the next major kernel release during the merge window. 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