Message ID | 20230130-hid-const-ll-driver-v1-9-3fc282b3b1d0@weissschuh.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1996126wrn; Sun, 29 Jan 2023 20:01:24 -0800 (PST) X-Google-Smtp-Source: AMrXdXuTNflNJM1sOqpiegyLtbwx5k4GI1TSQiuHyjDvUWpnr7qZJO4k9SIN1sSv86/JFumddaGj X-Received: by 2002:a05:6402:270b:b0:498:18e7:1667 with SMTP id y11-20020a056402270b00b0049818e71667mr69309051edd.10.1675051283999; Sun, 29 Jan 2023 20:01:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675051283; cv=none; d=google.com; s=arc-20160816; b=or7G2+bIfTImOL3e4geDeWSBcne4qpWgymgVwmTwXJnaKaII0nW5MF+hCn/WvVbG/e C9T+8LO4QWULFsxVDsQy2PNlikRX7aLaHjzBtwYpPkmLPWcsw/DBVx8TNxg/+Tabi7fM gbVXSY9TgDg2KSYFNnAvudTR2i5okWcMqoTzeZwTCVqvygTIs5lgSE/ZcukEusheXhCw wq7/TliOD6GaODJ9OJSs2H3+cr9+wj+YKg9VhB8/Hz2Mx0b62+HoHNnheIiZiPTQK85f EBSzTgVMsG9kT6QrkriyvP/YO/Gwmjx+WaNYzuSvKwNHPb0g7y1R5y0VQVxD/a4nN7qs Q5Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:dkim-signature :from; bh=oQOamRWnb7yWTLv50iSAfLFU9qgzugepmRcCKpZ/sas=; b=MIRI7FPoCkGSSmLUIhyl8kaNZQPctrIz71kQOS/j7zpZfQwBYTXx02yjglnYsUkzBs Mz7RsI8i52/yLCIahy/+bkEPCxISWmiCzMJie4vwMjTVnC1KHr/dmjqsLlj8T/b5qmqP lsueJdU+/k8UevkxB0yfyIpiU7v+bWapqqoX7chJ3PDaYwsUgIZlHF46cTNC3eYnVTPs bMt6gu94SROKV0Ca65g7GczPY5NR/YaMS74woGDsgDjVH54aRfXZsFUDCjcTn44j1Iki W0BBnPgwPExJp0AqXeuDTmknOmo+AgKznTMY4ZU6XzlLRx28NxNvl6RBwF0wH0GHz4Sl tcZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@weissschuh.net header.s=mail header.b=jaobbKlM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f5-20020a170906738500b008621404f1d6si13646516ejl.892.2023.01.29.20.01.01; Sun, 29 Jan 2023 20:01:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@weissschuh.net header.s=mail header.b=jaobbKlM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235678AbjA3EAm (ORCPT <rfc822;n2h9z4@gmail.com> + 99 others); Sun, 29 Jan 2023 23:00:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235585AbjA3EAZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 29 Jan 2023 23:00:25 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED5E02D7E; Sun, 29 Jan 2023 20:00:03 -0800 (PST) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=weissschuh.net; s=mail; t=1675051189; bh=CeE4LFDYquttLQyjdPuIA0yJAhL1uKGNNm1YrWRTAXo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=jaobbKlMg6u5gdaxw5uGqJWbiCgvqun6lx1rEZYJufIvUp4ZXEzHQqAgvpGGP4pwn 46ZVIbbDyqQA3y8hpqFOef7CA3jKP5XPh37d7rJIeRAwBGQkBQdrgSPvUe8ORs9dwG NkHNbSWmwq3hcZDtaM0+4RBZ6uO7IsMoYtIkskKI= Date: Mon, 30 Jan 2023 03:59:45 +0000 Subject: [PATCH 9/9] staging: greybus: hid: Constify lowlevel HID driver MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230130-hid-const-ll-driver-v1-9-3fc282b3b1d0@weissschuh.net> References: <20230130-hid-const-ll-driver-v1-0-3fc282b3b1d0@weissschuh.net> In-Reply-To: <20230130-hid-const-ll-driver-v1-0-3fc282b3b1d0@weissschuh.net> To: Basavaraj Natikar <basavaraj.natikar@amd.com>, Jiri Kosina <jikos@kernel.org>, Benjamin Tissoires <benjamin.tissoires@redhat.com>, "K. Y. Srinivasan" <kys@microsoft.com>, Haiyang Zhang <haiyangz@microsoft.com>, Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>, =?utf-8?q?Filipe_La=C3=ADns?= <lains@riseup.net>, Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>, Maximilian Luz <luzmaximilian@gmail.com>, Corentin Chary <corentin.chary@gmail.com>, Hans de Goede <hdegoede@redhat.com>, Mark Gross <markgross@kernel.org>, Viresh Kumar <vireshk@kernel.org>, Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, platform-driver-x86@vger.kernel.org, acpi4asus-user@lists.sourceforge.net, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1675051185; l=861; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=CeE4LFDYquttLQyjdPuIA0yJAhL1uKGNNm1YrWRTAXo=; b=SQUZOk9LKgSTETWY2YqlC8x+hEL9fvydNvVkE6petc6xt8Y5mvKz320j0CJb8DILZGDzcF9A74aC /T98d7JHADiph9vBYy0ilCKP+bmJauMaefm3e9xlClK6LSByfdHS X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756418575313032888?= X-GMAIL-MSGID: =?utf-8?q?1756418575313032888?= |
Series |
HID: Constify lowlevel HID drivers
|
|
Commit Message
Thomas Weißschuh
Jan. 30, 2023, 3:59 a.m. UTC
Since commit 52d225346904 ("HID: Make lowlevel driver structs const")
the lowlevel HID drivers are only exposed as const.
Take advantage of this to constify the underlying structure, too.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
drivers/staging/greybus/hid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Mon, Jan 30, 2023 at 03:59:45AM +0000, Thomas Weißschuh wrote: > Since commit 52d225346904 ("HID: Make lowlevel driver structs const") > the lowlevel HID drivers are only exposed as const. > > Take advantage of this to constify the underlying structure, too. > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/staging/greybus/hid.c b/drivers/staging/greybus/hid.c index adb91286803a..15335c38cb26 100644 --- a/drivers/staging/greybus/hid.c +++ b/drivers/staging/greybus/hid.c @@ -381,7 +381,7 @@ static int gb_hid_power(struct hid_device *hid, int lvl) } /* HID structure to pass callbacks */ -static struct hid_ll_driver gb_hid_ll_driver = { +static const struct hid_ll_driver gb_hid_ll_driver = { .parse = gb_hid_parse, .start = gb_hid_start, .stop = gb_hid_stop,