From 3a905cd231de8834cda329f20854dc1f91328ae5 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 8 Apr 2020 08:33:00 -0600 Subject: [PATCH] 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 Reviewed-by: Jaehoon Chung --- drivers/mmc/mmc-uclass.c | 2 +- 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 */ -- 2.25.1