firewire: core: adds constant qualifier for local helper functions
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sun, 24 Dec 2023 22:23:00 +0000 (07:23 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 8 Jan 2024 00:36:56 +0000 (09:36 +0900)
Some local functions just handles given argument as mutable, thus it is
preferable to add constant qualifier to them.

Link: https://lore.kernel.org/r/20231221134849.603857-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
drivers/firewire/core-device.c

index 7ca8e31dadb51888f11debe46cf4e57ccb60b75a..f39075c77de0b5c12751f81ab0aa23a1fb324f39 100644 (file)
@@ -171,7 +171,7 @@ static const struct ieee1394_device_id *unit_match(struct device *dev,
        return NULL;
 }
 
-static bool is_fw_unit(struct device *dev);
+static bool is_fw_unit(const struct device *dev);
 
 static int fw_unit_match(struct device *dev, struct device_driver *drv)
 {
@@ -679,7 +679,7 @@ static struct device_type fw_unit_type = {
        .release        = fw_unit_release,
 };
 
-static bool is_fw_unit(struct device *dev)
+static bool is_fw_unit(const struct device *dev)
 {
        return dev->type == &fw_unit_type;
 }
@@ -835,7 +835,7 @@ static struct device_type fw_device_type = {
        .release = fw_device_release,
 };
 
-static bool is_fw_device(struct device *dev)
+static bool is_fw_device(const struct device *dev)
 {
        return dev->type == &fw_device_type;
 }