Since 52d225346904 ("HID: Make lowlevel driver structs const") the lowlevel HID drivers are only exposed as const.
Take advantage of this to constify the underlying structures, too.
Signed-off-by: Thomas Weißschuh linux@weissschuh.net --- Thomas Weißschuh (9): HID: amd_sfh: Constify lowlevel HID driver HID: hyperv: Constify lowlevel HID driver HID: logitech-dj: Constify lowlevel HID driver HID: steam: Constify lowlevel HID driver HID: intel-ish-hid: Constify lowlevel HID driver HID: surface-hid: Constify lowlevel HID driver platform/x86: asus-tf103c-dock: Constify lowlevel HID driver platform/x86: asus-tf103c-dock: Constify toprow keymap staging: greybus: hid: Constify lowlevel HID driver
drivers/hid/amd-sfh-hid/amd_sfh_hid.c | 2 +- drivers/hid/hid-hyperv.c | 2 +- drivers/hid/hid-logitech-dj.c | 4 ++-- drivers/hid/hid-steam.c | 2 +- drivers/hid/intel-ish-hid/ishtp-hid.c | 2 +- drivers/hid/surface-hid/surface_hid_core.c | 2 +- drivers/platform/x86/asus-tf103c-dock.c | 4 ++-- drivers/staging/greybus/hid.c | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) --- base-commit: e04955db6a7c3fc4a1e6978649b61a6f5f8028e3 change-id: 20230130-hid-const-ll-driver-fcfdd3af11b8
Best regards,
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/hid/amd-sfh-hid/amd_sfh_hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_hid.c b/drivers/hid/amd-sfh-hid/amd_sfh_hid.c index 1b18291fc5af..705b52337068 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_hid.c +++ b/drivers/hid/amd-sfh-hid/amd_sfh_hid.c @@ -112,7 +112,7 @@ void amdtp_hid_wakeup(struct hid_device *hid) } }
-static struct hid_ll_driver amdtp_hid_ll_driver = { +static const struct hid_ll_driver amdtp_hid_ll_driver = { .parse = amdtp_hid_parse, .start = amdtp_hid_start, .stop = amdtp_hid_stop,
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/hid/hid-hyperv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c index cf12f17e6533..819eb38eb5df 100644 --- a/drivers/hid/hid-hyperv.c +++ b/drivers/hid/hid-hyperv.c @@ -424,7 +424,7 @@ static int mousevsc_hid_raw_request(struct hid_device *hid, return 0; }
-static struct hid_ll_driver mousevsc_ll_driver = { +static const struct hid_ll_driver mousevsc_ll_driver = { .parse = mousevsc_hid_parse, .open = mousevsc_hid_open, .close = mousevsc_hid_close,
On Mon, Jan 30, 2023 at 03:59:38AM +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: Wei Liu wei.liu@kernel.org
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/hid/hid-logitech-dj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c index c358778e070b..62180414efcc 100644 --- a/drivers/hid/hid-logitech-dj.c +++ b/drivers/hid/hid-logitech-dj.c @@ -554,7 +554,7 @@ static const u8 hid_reportid_size_map[NUMBER_OF_HID_REPORTS] = {
#define LOGITECH_DJ_INTERFACE_NUMBER 0x02
-static struct hid_ll_driver logi_dj_ll_driver; +static const struct hid_ll_driver logi_dj_ll_driver;
static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev); static void delayedwork_callback(struct work_struct *work); @@ -1506,7 +1506,7 @@ static bool logi_dj_ll_may_wakeup(struct hid_device *hid) return hid_hw_may_wakeup(djrcv_dev->hidpp); }
-static struct hid_ll_driver logi_dj_ll_driver = { +static const struct hid_ll_driver logi_dj_ll_driver = { .parse = logi_dj_ll_parse, .start = logi_dj_ll_start, .stop = logi_dj_ll_stop,
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/hid/hid-steam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-steam.c b/drivers/hid/hid-steam.c index 8ee43cb225fc..29ec8b34741a 100644 --- a/drivers/hid/hid-steam.c +++ b/drivers/hid/hid-steam.c @@ -674,7 +674,7 @@ static int steam_client_ll_raw_request(struct hid_device *hdev, report_type, reqtype); }
-static struct hid_ll_driver steam_client_ll_driver = { +static const struct hid_ll_driver steam_client_ll_driver = { .parse = steam_client_ll_parse, .start = steam_client_ll_start, .stop = steam_client_ll_stop,
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/hid/intel-ish-hid/ishtp-hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/intel-ish-hid/ishtp-hid.c b/drivers/hid/intel-ish-hid/ishtp-hid.c index 14c271d7d8a9..00c6f0ebf356 100644 --- a/drivers/hid/intel-ish-hid/ishtp-hid.c +++ b/drivers/hid/intel-ish-hid/ishtp-hid.c @@ -183,7 +183,7 @@ void ishtp_hid_wakeup(struct hid_device *hid) wake_up_interruptible(&hid_data->hid_wait); }
-static struct hid_ll_driver ishtp_hid_ll_driver = { +static const struct hid_ll_driver ishtp_hid_ll_driver = { .parse = ishtp_hid_parse, .start = ishtp_hid_start, .stop = ishtp_hid_stop,
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/hid/surface-hid/surface_hid_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/surface-hid/surface_hid_core.c b/drivers/hid/surface-hid/surface_hid_core.c index 87637f813de2..a3e9cceddfac 100644 --- a/drivers/hid/surface-hid/surface_hid_core.c +++ b/drivers/hid/surface-hid/surface_hid_core.c @@ -174,7 +174,7 @@ static int surface_hid_raw_request(struct hid_device *hid, unsigned char reportn return -EIO; }
-static struct hid_ll_driver surface_hid_ll_driver = { +static const struct hid_ll_driver surface_hid_ll_driver = { .start = surface_hid_start, .stop = surface_hid_stop, .open = surface_hid_open,
On 1/30/23 04:59, 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
Looks good to me.
Reviewed-by: Maximilian Luz luzmaximilian@gmail.com
drivers/hid/surface-hid/surface_hid_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/surface-hid/surface_hid_core.c b/drivers/hid/surface-hid/surface_hid_core.c index 87637f813de2..a3e9cceddfac 100644 --- a/drivers/hid/surface-hid/surface_hid_core.c +++ b/drivers/hid/surface-hid/surface_hid_core.c @@ -174,7 +174,7 @@ static int surface_hid_raw_request(struct hid_device *hid, unsigned char reportn return -EIO; } -static struct hid_ll_driver surface_hid_ll_driver = { +static const struct hid_ll_driver surface_hid_ll_driver = { .start = surface_hid_start, .stop = surface_hid_stop, .open = surface_hid_open,
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/platform/x86/asus-tf103c-dock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/asus-tf103c-dock.c b/drivers/platform/x86/asus-tf103c-dock.c index 62310e06282b..84c45e8f51ad 100644 --- a/drivers/platform/x86/asus-tf103c-dock.c +++ b/drivers/platform/x86/asus-tf103c-dock.c @@ -250,7 +250,7 @@ static int tf103c_dock_hid_raw_request(struct hid_device *hid, u8 reportnum, return 0; }
-static struct hid_ll_driver tf103c_dock_hid_ll_driver = { +static const struct hid_ll_driver tf103c_dock_hid_ll_driver = { .parse = tf103c_dock_hid_parse, .start = tf103c_dock_hid_start, .stop = tf103c_dock_hid_stop,
This structure is never modified, make it const.
Signed-off-by: Thomas Weißschuh linux@weissschuh.net --- drivers/platform/x86/asus-tf103c-dock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/asus-tf103c-dock.c b/drivers/platform/x86/asus-tf103c-dock.c index 84c45e8f51ad..aeb1138464df 100644 --- a/drivers/platform/x86/asus-tf103c-dock.c +++ b/drivers/platform/x86/asus-tf103c-dock.c @@ -259,7 +259,7 @@ static const struct hid_ll_driver tf103c_dock_hid_ll_driver = { .raw_request = tf103c_dock_hid_raw_request, };
-static int tf103c_dock_toprow_codes[13][2] = { +static const int tf103c_dock_toprow_codes[13][2] = { /* Normal, AltGr pressed */ { KEY_POWER, KEY_F1 }, { KEY_RFKILL, KEY_F2 },
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(-)
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,
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
Hi,
On 1/30/23 04:59, Thomas Weißschuh wrote:
Since 52d225346904 ("HID: Make lowlevel driver structs const") the lowlevel HID drivers are only exposed as const.
Take advantage of this to constify the underlying structures, too.
Signed-off-by: Thomas Weißschuh linux@weissschuh.net
Thanks, series looks good to me:
Reviewed-by: Hans de Goede hdegoede@redhat.com
I'll also pick up / merge patches 7 + 8 into pdx86/for-next sometime this week.
Regards,
Hans
Thomas Weißschuh (9): HID: amd_sfh: Constify lowlevel HID driver HID: hyperv: Constify lowlevel HID driver HID: logitech-dj: Constify lowlevel HID driver HID: steam: Constify lowlevel HID driver HID: intel-ish-hid: Constify lowlevel HID driver HID: surface-hid: Constify lowlevel HID driver platform/x86: asus-tf103c-dock: Constify lowlevel HID driver platform/x86: asus-tf103c-dock: Constify toprow keymap staging: greybus: hid: Constify lowlevel HID driver
drivers/hid/amd-sfh-hid/amd_sfh_hid.c | 2 +- drivers/hid/hid-hyperv.c | 2 +- drivers/hid/hid-logitech-dj.c | 4 ++-- drivers/hid/hid-steam.c | 2 +- drivers/hid/intel-ish-hid/ishtp-hid.c | 2 +- drivers/hid/surface-hid/surface_hid_core.c | 2 +- drivers/platform/x86/asus-tf103c-dock.c | 4 ++-- drivers/staging/greybus/hid.c | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-)
base-commit: e04955db6a7c3fc4a1e6978649b61a6f5f8028e3 change-id: 20230130-hid-const-ll-driver-fcfdd3af11b8
Best regards,
Hi Hans,
On Mon, Jan 30, 2023 at 09:36:32AM +0100, Hans de Goede wrote:
Hi,
On 1/30/23 04:59, Thomas Weißschuh wrote:
Since 52d225346904 ("HID: Make lowlevel driver structs const") the lowlevel HID drivers are only exposed as const.
Take advantage of this to constify the underlying structures, too.
Signed-off-by: Thomas Weißschuh linux@weissschuh.net
Thanks, series looks good to me:
Reviewed-by: Hans de Goede hdegoede@redhat.com
I'll also pick up / merge patches 7 + 8 into pdx86/for-next sometime this week.
Please note that patch 7 depends on commit 52d225346904 ("HID: Make lowlevel driver structs const") which is not yet in Linus' tree, only in the HID tree (branch for-6.3/hid-core).
Maybe it's better to take it via the HID tree or I can resend when the prerequisites are in Linus' tree.
Regards,
Hans
Thomas Weißschuh (9): HID: amd_sfh: Constify lowlevel HID driver HID: hyperv: Constify lowlevel HID driver HID: logitech-dj: Constify lowlevel HID driver HID: steam: Constify lowlevel HID driver HID: intel-ish-hid: Constify lowlevel HID driver HID: surface-hid: Constify lowlevel HID driver platform/x86: asus-tf103c-dock: Constify lowlevel HID driver platform/x86: asus-tf103c-dock: Constify toprow keymap staging: greybus: hid: Constify lowlevel HID driver
drivers/hid/amd-sfh-hid/amd_sfh_hid.c | 2 +- drivers/hid/hid-hyperv.c | 2 +- drivers/hid/hid-logitech-dj.c | 4 ++-- drivers/hid/hid-steam.c | 2 +- drivers/hid/intel-ish-hid/ishtp-hid.c | 2 +- drivers/hid/surface-hid/surface_hid_core.c | 2 +- drivers/platform/x86/asus-tf103c-dock.c | 4 ++-- drivers/staging/greybus/hid.c | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-)
base-commit: e04955db6a7c3fc4a1e6978649b61a6f5f8028e3 change-id: 20230130-hid-const-ll-driver-fcfdd3af11b8
Best regards,
Hi,
On 1/30/23 14:26, Thomas Weißschuh wrote:
Hi Hans,
On Mon, Jan 30, 2023 at 09:36:32AM +0100, Hans de Goede wrote:
Hi,
On 1/30/23 04:59, Thomas Weißschuh wrote:
Since 52d225346904 ("HID: Make lowlevel driver structs const") the lowlevel HID drivers are only exposed as const.
Take advantage of this to constify the underlying structures, too.
Signed-off-by: Thomas Weißschuh linux@weissschuh.net
Thanks, series looks good to me:
Reviewed-by: Hans de Goede hdegoede@redhat.com
I'll also pick up / merge patches 7 + 8 into pdx86/for-next sometime this week.
Please note that patch 7 depends on commit 52d225346904 ("HID: Make lowlevel driver structs const") which is not yet in Linus' tree, only in the HID tree (branch for-6.3/hid-core).
Maybe it's better to take it via the HID tree or I can resend when the prerequisites are in Linus' tree.
Ah yes then it would be better to take the entire set through the HID tree, here is my ack for that:
Reviewed-by: Hans de Goede hdegoede@redhat.com
Regards,
Hans
Thomas Weißschuh (9): HID: amd_sfh: Constify lowlevel HID driver HID: hyperv: Constify lowlevel HID driver HID: logitech-dj: Constify lowlevel HID driver HID: steam: Constify lowlevel HID driver HID: intel-ish-hid: Constify lowlevel HID driver HID: surface-hid: Constify lowlevel HID driver platform/x86: asus-tf103c-dock: Constify lowlevel HID driver platform/x86: asus-tf103c-dock: Constify toprow keymap staging: greybus: hid: Constify lowlevel HID driver
drivers/hid/amd-sfh-hid/amd_sfh_hid.c | 2 +- drivers/hid/hid-hyperv.c | 2 +- drivers/hid/hid-logitech-dj.c | 4 ++-- drivers/hid/hid-steam.c | 2 +- drivers/hid/intel-ish-hid/ishtp-hid.c | 2 +- drivers/hid/surface-hid/surface_hid_core.c | 2 +- drivers/platform/x86/asus-tf103c-dock.c | 4 ++-- drivers/staging/greybus/hid.c | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-)
base-commit: e04955db6a7c3fc4a1e6978649b61a6f5f8028e3 change-id: 20230130-hid-const-ll-driver-fcfdd3af11b8
Best regards,
On Mon, 30 Jan 2023 03:59:36 +0000, Thomas Weißschuh wrote:
Since 52d225346904 ("HID: Make lowlevel driver structs const") the lowlevel HID drivers are only exposed as const.
Take advantage of this to constify the underlying structures, too.
Applied to hid/hid.git (for-6.3/hid-core), thanks!
[1/9] HID: amd_sfh: Constify lowlevel HID driver https://git.kernel.org/hid/hid/c/65b7015bfe16 [2/9] HID: hyperv: Constify lowlevel HID driver https://git.kernel.org/hid/hid/c/d38213a911c5 [3/9] HID: logitech-dj: Constify lowlevel HID driver https://git.kernel.org/hid/hid/c/662eee8d46df [4/9] HID: steam: Constify lowlevel HID driver https://git.kernel.org/hid/hid/c/ddb6792f0ef2 [5/9] HID: intel-ish-hid: Constify lowlevel HID driver https://git.kernel.org/hid/hid/c/3352c3e0bf9b [6/9] HID: surface-hid: Constify lowlevel HID driver https://git.kernel.org/hid/hid/c/dd350afc1757 [7/9] platform/x86: asus-tf103c-dock: Constify lowlevel HID driver https://git.kernel.org/hid/hid/c/63509b149f1b [8/9] platform/x86: asus-tf103c-dock: Constify toprow keymap https://git.kernel.org/hid/hid/c/783c3394b493 [9/9] staging: greybus: hid: Constify lowlevel HID driver https://git.kernel.org/hid/hid/c/ff17bb876014
Cheers,