Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1855238rdb; Sat, 10 Feb 2024 23:44:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IHSWXAJjeGLCyttzBsKrA7kGuFTacT7DSSKcrULcMXEpR9JIRO0wKK04uSjnn6Gy5aV01he X-Received: by 2002:aa7:8691:0:b0:6e0:9900:117f with SMTP id d17-20020aa78691000000b006e09900117fmr3224910pfo.6.1707637473073; Sat, 10 Feb 2024 23:44:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707637473; cv=pass; d=google.com; s=arc-20160816; b=0mMgkEIpXSoaGTNhnxFKc7x6VWmDEcVRuGrFzLwU5zU0coVG52GTMQmceqcYYnZ7rD 1EF0GvI5FoXgABZF8prRsYKPjAHKdLJ2FOimZ9F6VOo9iW2bCGPrhoZCYumEl2rS1Nqe NAI1cD+R2mHthV4zv4zpnSOETxuSrlfeMJixQVz49zYFno8BpziHJRblMze2ntIvTxTC b3k2I2mupUa39E5berv1eicTVDqlXyAc9FTBYjUS7sYXiORGLhCCWl6fcAH9KRarDbN2 kXBmmlway919tybforJjGF6eEe0B322t5LjtRiJSGk+xHkP6plFlbZn8AePRoIXfmorQ QX7w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:dkim-signature:from; bh=NX4kPnkghriz8C5dtPzUceyYxZS8GIQH2mEq/Ym7Bqo=; fh=zT7nB555W4TYFPH8rJ9iktd6iN3Dy5EUpVBCKCV40gQ=; b=Mll4BEnTIbaMO5yhLEMUExu+M/ar9cHRDiHBb5xZNLwf5ZxR4UMcEnP3fWXniH75QQ 2oGLfj+Qp/WUxT34ZBuoRWlLTaSLFp8z52Hfe1MoNkxKYJZP0oIOo38SU/yo0zLsu7LP XYQzdh2ps7k6DLuCTy3fJkb171SLHEWmu5hEc9RXhT2uJgYE88f5NcSh0+tFaESgpxSl LoJ/GlLEX03UfBBU+960Tsmq/OIm0rM48dLrslM7gWBsGDZi3c049Wn7nqVIC51n58S6 e7Y+GIXOqI8Jo6ZiibNmCHYAQhRkQRFB1lvdYuOrsRCDZCppWO4XuPPvislSb6pNW3ny ct2Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=W2GxqCzX; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-60435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60435-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net X-Forwarded-Encrypted: i=2; AJvYcCVCnxXGs+FDcfttAJqBnIzLexUG4UZsopeOaCDqQfxd1/8CJXjqwqts58mPB4oZlkGKo7iP88D35zY+NvzSEDzwhPrPQ2p1cJEG4EPD9A== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id k205-20020a6284d6000000b006ddcff14bacsi3213202pfd.284.2024.02.10.23.44.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 23:44:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@marliere.net header.s=2024 header.b=W2GxqCzX; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=marliere.net dmarc=pass fromdomain=marliere.net); spf=pass (google.com: domain of linux-kernel+bounces-60435-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60435-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=marliere.net 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 4542CB21F1A for ; Sat, 10 Feb 2024 15:15:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 24D6D5C618; Sat, 10 Feb 2024 15:14:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b="W2GxqCzX" Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE5A95C5F5; Sat, 10 Feb 2024 15:14:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707578080; cv=none; b=sAYu5i3pBybtZnXaj3k8yVCEZxdtWqAQwoAmCrt6BBUP99e+NWLDOoMVrtOLpIlCjz8ShNYto+yxJwKNhRD80Jn6K/iOyPBV2tc3sRcx9dPBdDEGtQnwU9giMUhj2Sn9YlOQP3T4ulo3chlMw0VaoyL+iamN4wyy8NFmRjhAgOw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707578080; c=relaxed/simple; bh=JoJOoyztp4EgMKE0w5/pYOrwIDStyJc4o5zoKCZW3wI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZQF+SrDnGZBOKHPldP5drA/Jdfn5woZ8FSvau3n/fpBiMssrV26Gx89XHyMmITyskMFXz0E2pNfhpnDWdRxpdcjJ8U/eTYcy+YZCYAJQG1bXBR2ehZ4x05DVaMqG1KC027L7bGB3DQuQqOC0lA1JHo+FVGzPudshr4d3rAxoC+A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=marliere.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=marliere.net header.i=@marliere.net header.b=W2GxqCzX; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=marliere.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1d7232dcb3eso16228625ad.2; Sat, 10 Feb 2024 07:14:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707578078; x=1708182878; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:dkim-signature:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=NX4kPnkghriz8C5dtPzUceyYxZS8GIQH2mEq/Ym7Bqo=; b=mZ+YFD0J8Dxvc64Rtvmlk9DjWCqHZc/hjENDKopcYphZ4EOpyOd91VuIARt1BOHHZH lTxPotL3rJef9grbESbFcFgf7+DRtWKZ6ugxDUApk0u8MQgQqA22O8o7+M4cFRomsYnN Xa+LWEPBjhESlRwSYv2wt1OR4FqkxmoYiT4BIn30PJZIrXHSvERniVhyasZZzJ4Ci6tJ k31Bo2N+zzKNzLq48UAQD4+2dKcpz7/DLKxIeG6Xc9vkMeoCb+yRuSkEiy8vFKOBwuOv B28uuAjW0fGhTtltmeTt988qz0Pz8MsZizvs+XTli5nhe1hvC1N2rJnKnXVx7zklFbmq 7fTw== X-Gm-Message-State: AOJu0YxaIh8KxcpEWgjogKtujFFG173R9ox3Yi4WRolL5Fmli4NXwu+T 3yr03zYrcy/icbXAAl2XDFX2zEZQ6NgAv4hTCpmVKAtNj7lK1CRI X-Received: by 2002:a17:903:40c4:b0:1d7:7347:d80e with SMTP id t4-20020a17090340c400b001d77347d80emr2526076pld.37.1707578078086; Sat, 10 Feb 2024 07:14:38 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCV39fp8PQTzcsikdCZCt6bed5TTjnqQFJ76j1TZJmRF/7uoJmgtpxhg75Jgy13xRQq4nCyu7dmapAScGdt3O2IO2+6s8PqEpzXeIfmgDye20I/inbBE30IWv+evM3PKVj9GwVOq3OJOEw== Received: from mail.marliere.net ([24.199.118.162]) by smtp.gmail.com with ESMTPSA id kp3-20020a170903280300b001d8a5c08277sm3151239plb.260.2024.02.10.07.14.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 07:14:37 -0800 (PST) From: "Ricardo B. Marliere" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marliere.net; s=2024; t=1707578076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NX4kPnkghriz8C5dtPzUceyYxZS8GIQH2mEq/Ym7Bqo=; b=W2GxqCzXO8zzIE/IuIWyMRqLULmxoXdB+qFDfqApXPAaPY8CY6jxlvEVxY4s2AgMSLhyR4 U5eO/rrNXhZ19dVEQhAVKsEOMCcVMVSwnH2eZBOSCaRZl06GpzgJIjH0DOlErtmkPyt020 lR7U+DFjbcEqbWucgcD4fDaBCzLvvZARSy24OTOxyfMZ3cHuDEpOnsnqEmpioq/m/2oGZZ rALgpVRYUCum1xjh0lNoHcceZkPmpgTluTKbFmEXLKGP/9BRAGLhPIdF+uYu6yu5WPcYUg lVJH8w9dM+LdBLAR9Ku7BETJMgou8QRduIFGs+CTMfpCD7t79luYp3hEcOALRg== Authentication-Results: ORIGINATING; auth=pass smtp.auth=ricardo@marliere.net smtp.mailfrom=ricardo@marliere.net Date: Sat, 10 Feb 2024 12:15:02 -0300 Subject: [PATCH 2/2] Input: serio - make serio_bus const Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240210-bus_cleanup-input2-v1-2-0daef7e034e0@marliere.net> References: <20240210-bus_cleanup-input2-v1-0-0daef7e034e0@marliere.net> In-Reply-To: <20240210-bus_cleanup-input2-v1-0-0daef7e034e0@marliere.net> To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Ricardo B. Marliere" X-Developer-Signature: v=1; a=openpgp-sha256; l=1356; i=ricardo@marliere.net; h=from:subject:message-id; bh=JoJOoyztp4EgMKE0w5/pYOrwIDStyJc4o5zoKCZW3wI=; b=owEBbQKS/ZANAwAKAckLinxjhlimAcsmYgBlx5L5DNW883c3i//px5uQLulX/pacA+WVTN1VV MwzcHOG0VGJAjMEAAEKAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCZceS+QAKCRDJC4p8Y4ZY pmsYD/wK1YmO40D0PMDD1RYjsRNU20uSX/MD6Op9yUikmaKnAaj417aKLdjR0NVC7JxWHZJIgm8 i18kvg79pp7UCKhG6dVdUfrFZR6OCXlaJzCPxZnt06dKdaWfrVOTGrwqwOU1G9Ni5WNY7VKNNPD CCtmd4uveTxIxuZsnAmy2laWHQfI84H8s2a7Jx+bHeiU/qwSmEcpKBnQAXdzN3OnNFLSzUCxbJ6 ylyQiEmYNfg9O0KCBqkv1u+TuFbDxU6ptQ2fhlDrzl59dBlWpJ669phEocfcoKXx5mO12NDERf7 L3DZCDVAUgF71Ocx7D93W9UWD8Ppnau+Cq1BkAQ5rqV8j4meAWYuYEaZTqQhMuDDFDkwNCHOnx8 AuRCgnQpIm0XWKIwZML7aSXxItYWPKtdCe78xh9QGOlY3f0S+ZtHwWnGYhJx9udIvaft1PlhiAP hLvJeW74MqRQawuJxzndFtTIDOpOe8evkyi+Xu61jgju5NEw++QJoK+ofVzjEKi+r1AmyA1ujxH w0uF3iF2uDeKojv862ecADb1pN1mUqMTe3aIvrXvIAkaya58m2Oz8Zbvj1UCxwgVbSbbGQUaXgg QbB3tjBpQGt1NamzoMNyqVaojo3/rNEuq/OG5VH211vx7Bml9KGO63Yk2b/vKj2VHRL0G4QYkYg fbBHstPTIi0OiPQ== X-Developer-Key: i=ricardo@marliere.net; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 Now that the driver core can properly handle constant struct bus_type, move the serio_bus variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere --- drivers/input/serio/serio.c | 2 +- include/linux/serio.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index 767fc9efb4a8..a8838b522627 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c @@ -1007,7 +1007,7 @@ irqreturn_t serio_interrupt(struct serio *serio, } EXPORT_SYMBOL(serio_interrupt); -struct bus_type serio_bus = { +const struct bus_type serio_bus = { .name = "serio", .drv_groups = serio_driver_groups, .match = serio_bus_match, diff --git a/include/linux/serio.h b/include/linux/serio.h index 6c27d413da92..7ca41af93b37 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h @@ -15,7 +15,7 @@ #include #include -extern struct bus_type serio_bus; +extern const struct bus_type serio_bus; struct serio { void *port_data; -- 2.43.0