diff mbox series

[v3,1/5] scsi: ufs: Remove unused min_uA field in struct ufs_vreg

Message ID 1552875280-16196-3-git-send-email-stanley.chu@mediatek.com (mailing list archive)
State New, archived
Headers show
Series [v3,1/5] scsi: ufs: Remove unused min_uA field in struct ufs_vreg | expand

Commit Message

Stanley Chu March 18, 2019, 2:14 a.m. UTC
There are two fields related to regulator current limit in struct
ufs_vreg: "min_uA" and "max_uA".

"max_uA" is probed by "<name>-max-microamp" property from device
tree and used for

- regulator_set_load operations, and
- icc_level configuration in device.

However "min_uA" field is not used anywhere, thus we can remove it.

Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Marc Gonzalez <marc.w.gonzalez@free.fr>
---
 drivers/scsi/ufs/ufs.h           | 1 -
 drivers/scsi/ufs/ufshcd-pltfrm.c | 1 -
 2 files changed, 2 deletions(-)

Comments

Alim Akhtar March 19, 2019, 3:06 a.m. UTC | #1
Hi Stanley

On Mon, Mar 18, 2019 at 7:46 AM Stanley Chu <stanley.chu@mediatek.com> wrote:
>
> There are two fields related to regulator current limit in struct
> ufs_vreg: "min_uA" and "max_uA".
>
> "max_uA" is probed by "<name>-max-microamp" property from device
> tree and used for
>
> - regulator_set_load operations, and
> - icc_level configuration in device.
>
> However "min_uA" field is not used anywhere, thus we can remove it.
>
> Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
> Reviewed-by: Marc Gonzalez <marc.w.gonzalez@free.fr>
> ---
Looks good.
Acked-by: Alim Akhtar <alim.akhtar@samsung.com>

>  drivers/scsi/ufs/ufs.h           | 1 -
>  drivers/scsi/ufs/ufshcd-pltfrm.c | 1 -
>  2 files changed, 2 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h
> index 7da7318eb6a6..0f23ac80bacd 100644
> --- a/drivers/scsi/ufs/ufs.h
> +++ b/drivers/scsi/ufs/ufs.h
> @@ -516,7 +516,6 @@ struct ufs_vreg {
>         bool enabled;
>         int min_uV;
>         int max_uV;
> -       int min_uA;
>         int max_uA;
>  };
>
> diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
> index 895a9b5ac989..588079286e8a 100644
> --- a/drivers/scsi/ufs/ufshcd-pltfrm.c
> +++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
> @@ -164,7 +164,6 @@ static int ufshcd_populate_vreg(struct device *dev, const char *name,
>                 goto out;
>         }
>
> -       vreg->min_uA = 0;
>         if (!strcmp(name, "vcc")) {
>                 if (of_property_read_bool(np, "vcc-supply-1p8")) {
>                         vreg->min_uV = UFS_VREG_VCC_1P8_MIN_UV;
> --
> 2.18.0
>
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h
index 7da7318eb6a6..0f23ac80bacd 100644
--- a/drivers/scsi/ufs/ufs.h
+++ b/drivers/scsi/ufs/ufs.h
@@ -516,7 +516,6 @@  struct ufs_vreg {
 	bool enabled;
 	int min_uV;
 	int max_uV;
-	int min_uA;
 	int max_uA;
 };
 
diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
index 895a9b5ac989..588079286e8a 100644
--- a/drivers/scsi/ufs/ufshcd-pltfrm.c
+++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
@@ -164,7 +164,6 @@  static int ufshcd_populate_vreg(struct device *dev, const char *name,
 		goto out;
 	}
 
-	vreg->min_uA = 0;
 	if (!strcmp(name, "vcc")) {
 		if (of_property_read_bool(np, "vcc-supply-1p8")) {
 			vreg->min_uV = UFS_VREG_VCC_1P8_MIN_UV;