diff options
author | Simon Glass <sjg@chromium.org> | 2020-04-08 08:33:00 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-04-24 16:40:09 -0400 |
commit | 3a905cd231de8834cda329f20854dc1f91328ae5 (patch) | |
tree | 7d0842fd3a139b5dc7d73438711b6f0d5f438c06 | |
parent | f05970380e4c72a198cce29affc622a8e543b4de (diff) |
dm: mmc: Update mmc_get_mmc_dev() to use const *
This function does not modify the device to change it to use const *, so
that callers with a const udevice * can call it without a cast.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
-rw-r--r-- | drivers/mmc/mmc-uclass.c | 2 | ||||
-rw-r--r-- | include/mmc.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index cb26d841be..f313bc1734 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -239,7 +239,7 @@ int mmc_of_parse(struct udevice *dev, struct mmc_config *cfg) return 0; } -struct mmc *mmc_get_mmc_dev(struct udevice *dev) +struct mmc *mmc_get_mmc_dev(const struct udevice *dev) { struct mmc_uclass_priv *upriv; diff --git a/include/mmc.h b/include/mmc.h index 5e9d15cb41..6a2e9739e0 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -377,7 +377,7 @@ struct mmc_uclass_priv { * @dev: Device * @return associated mmc struct pointer if available, else NULL */ -struct mmc *mmc_get_mmc_dev(struct udevice *dev); +struct mmc *mmc_get_mmc_dev(const struct udevice *dev); /* End of driver model support */ |