Message ID | 20200408083251.v5.6.Ic20e826b6d1a3ee0654b6064459d7beee3722309@changeid |
---|---|
State | Accepted |
Commit | 3a905cd231de8834cda329f20854dc1f91328ae5 |
Headers | show |
Series | A few little patches | expand |
On 4/8/20 11:33 PM, Simon Glass wrote: > 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 at chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung at samsung.com> Best Regards, Jaehoon Chung > --- > > Changes in v5: None > Changes in v4: None > > 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 c75892a72c1..88fc7d79f8e 100644 > --- a/drivers/mmc/mmc-uclass.c > +++ b/drivers/mmc/mmc-uclass.c > @@ -223,7 +223,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 e83c22423bf..0f9184b9714 100644 > --- a/include/mmc.h > +++ b/include/mmc.h > @@ -374,7 +374,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 */ > >
On Wed, Apr 08, 2020 at 08:33:00AM -0600, Simon Glass wrote: > 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 at chromium.org> > Reviewed-by: Jaehoon Chung <jh80.chung at samsung.com> Applied to u-boot/master, thanks!
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index c75892a72c1..88fc7d79f8e 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -223,7 +223,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 e83c22423bf..0f9184b9714 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -374,7 +374,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 */
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 at chromium.org> --- Changes in v5: None Changes in v4: None drivers/mmc/mmc-uclass.c | 2 +- include/mmc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)