diff options
| author | Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> | 2026-05-05 12:39:28 +0200 |
|---|---|---|
| committer | Ulf Hansson <ulf.hansson@linaro.org> | 2026-05-11 16:59:43 +0200 |
| commit | 5808ef063b5e9342cb223bb9d07a6d5f6ac8711d (patch) | |
| tree | dca9ee3ac00c9e72738ce08621e7af9c55b09425 /drivers/misc | |
| parent | 4a3e92e8cfb9741cb687b14fc6ca81714b4c2c26 (diff) | |
| download | linux-next-5808ef063b5e9342cb223bb9d07a6d5f6ac8711d.tar.gz linux-next-5808ef063b5e9342cb223bb9d07a6d5f6ac8711d.zip | |
memstick: Constify the driver id_table
Just like all other driver structures, the id_table should never be
modified by core subsystem parts. Constify this member and actual data
structures for increased code safety.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/misc')
| -rw-r--r-- | drivers/misc/tifm_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/tifm_core.c b/drivers/misc/tifm_core.c index da0827724a61..aac8f0933e43 100644 --- a/drivers/misc/tifm_core.c +++ b/drivers/misc/tifm_core.c @@ -31,7 +31,7 @@ static const char *tifm_media_type_name(unsigned char type, unsigned char nt) return card_type_name[nt][type - 1]; } -static int tifm_dev_match(struct tifm_dev *sock, struct tifm_device_id *id) +static int tifm_dev_match(struct tifm_dev *sock, const struct tifm_device_id *id) { if (sock->type == id->type) return 1; @@ -43,7 +43,7 @@ static int tifm_bus_match(struct device *dev, const struct device_driver *drv) struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); const struct tifm_driver *fm_drv = container_of_const(drv, struct tifm_driver, driver); - struct tifm_device_id *ids = fm_drv->id_table; + const struct tifm_device_id *ids = fm_drv->id_table; if (ids) { while (ids->type) { |
