Skip to content

Commit ce32eff

Browse files
committed
staging: greybus: gbphy: fix up const issue with the match callback
gbphy_dev_match_id() should be taking a const pointer, as the pointer passed to it from the container_of() call was const to start with (it was accidentally cast away with the call.) Fix this all up by correctly marking the pointer types. Cc: Alex Elder <elder@kernel.org> Cc: greybus-dev@lists.linaro.org Fixes: d69d804 ("driver core: have match() callback in struct bus_type take a const *") Reviewed-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/2025070115-reoccupy-showy-e2ad@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ad5468a commit ce32eff

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/staging/greybus/gbphy.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ static int gbphy_dev_uevent(const struct device *dev, struct kobj_uevent_env *en
102102
}
103103

104104
static const struct gbphy_device_id *
105-
gbphy_dev_match_id(struct gbphy_device *gbphy_dev,
106-
struct gbphy_driver *gbphy_drv)
105+
gbphy_dev_match_id(const struct gbphy_device *gbphy_dev,
106+
const struct gbphy_driver *gbphy_drv)
107107
{
108108
const struct gbphy_device_id *id = gbphy_drv->id_table;
109109

@@ -119,7 +119,7 @@ gbphy_dev_match_id(struct gbphy_device *gbphy_dev,
119119

120120
static int gbphy_dev_match(struct device *dev, const struct device_driver *drv)
121121
{
122-
struct gbphy_driver *gbphy_drv = to_gbphy_driver(drv);
122+
const struct gbphy_driver *gbphy_drv = to_gbphy_driver(drv);
123123
struct gbphy_device *gbphy_dev = to_gbphy_dev(dev);
124124
const struct gbphy_device_id *id;
125125

0 commit comments

Comments
 (0)