button: adc: fix treshold typo
PATCH 1/1 button: adc: fix treshold typo
Fix the treshold typo in code by threshold.
Fixes c0165c85c3 ("button: add a simple Analog to Digital Converter device based button driver")
Suggested-by Tom Rini <[email protected]>
Signed-off-by Neil Armstrong <[email protected]>
--- drivers/button/button-adc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/button/button-adc.c +7 -7
@@ -55,7 +55,7 @@ static int button_adc_of_to_plat(struct udevice *dev)struct button_uc_plat *uc_plat =dev_get_uclass_plat (dev);struct button_adc_priv *priv =dev_get_priv (dev);struct ofnode_phandle_args args; -u32 treshold, up_treshold, t; +u32 threshold, up_threshold, t;ofnode node;int ret;
@@ -73,12 +73,12 @@ static int button_adc_of_to_plat(struct udevice *dev)return ret; ret =ofnode_read_u32 (dev_ofnode (dev->parent), -"keyup-threshold-microvolt" , &up_treshold); +"keyup-threshold-microvolt" , &up_threshold);if (ret)return ret; ret =ofnode_read_u32 (dev_ofnode (dev),"press-threshold-microvolt" , - &treshold); + &threshold);if (ret)return ret;
@@ -87,13 +87,13 @@ static int button_adc_of_to_plat(struct udevice *dev)if (ret)return ret; -if (t > treshold) - up_treshold = t; +if (t > threshold) + up_threshold = t; } priv->channel = args.args[0 ]; - priv->min = treshold; - priv->max = up_treshold; + priv->min = threshold; + priv->max = up_threshold;return ret; }
Signature · 1 line
2.25.1
PATCH 1/1 button: adc: fix treshold typo
Quoted 5 lines · Neil Armstrong
Fix the treshold typo in code by threshold.
Fixes c0165c85c3 ("button: add a simple Analog to Digital Converter device based button driver")Suggested-by Tom Rini <[email protected]>Signed-off-by Neil Armstrong <[email protected]>
Acked-by Marek Szyprowski <[email protected]>
Quoted 40 lines
--- drivers/button/button-adc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/button/button-adc.c +5
-5@@ -55,7 +55,7 @@ static int button_adc_of_to_plat(struct udevice *dev)struct button_uc_plat *uc_plat =dev_get_uclass_plat (dev);struct button_adc_priv *priv =dev_get_priv (dev);struct ofnode_phandle_args args; -u32 treshold, up_treshold, t; +u32 threshold, up_threshold, t;ofnode node;int ret;@@ -73,12 +73,12 @@ static int button_adc_of_to_plat(struct udevice *dev)return ret; ret =ofnode_read_u32 (dev_ofnode (dev->parent), -"keyup-threshold-microvolt" , &up_treshold); +"keyup-threshold-microvolt" , &up_threshold);if (ret)return ret; ret =ofnode_read_u32 (dev_ofnode (dev),"press-threshold-microvolt" , - &treshold); + &threshold);if (ret)return ret;@@ -87,13 +87,13 @@ static int button_adc_of_to_plat(struct udevice *dev)if (ret)return ret; -if (t > treshold) - up_treshold = t; +if (t > threshold) + up_threshold = t;
drivers/button/button-adc.c static int button_adc_of_to_plat(struct udevice *dev) · line 99
Quoted 10 lines
drivers/button/button-adc.c +2
-2} priv->channel = args.args[0 ]; - priv->min = treshold; - priv->max = up_treshold; + priv->min = threshold; + priv->max = up_threshold;return ret; }
Best regards
Signature · 2 lines
Marek Szyprowski, PhD Samsung R&D Institute Poland
PATCH 1/1 button: adc: fix treshold typo
Quoted 55 lines · Marek Szyprowski
Quoted 5 lines · Neil Armstrong
Fix the treshold typo in code by threshold.
Fixes c0165c85c3 ("button: add a simple Analog to Digital Converter device based button driver")Suggested-by Tom Rini <[email protected]>Signed-off-by Neil Armstrong <[email protected]>Acked-by Marek Szyprowski <[email protected]>Quoted 48 lines
--- drivers/button/button-adc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/button/button-adc.c +7
-7@@ -55,7 +55,7 @@ static int button_adc_of_to_plat(struct udevice *dev)struct button_uc_plat *uc_plat =dev_get_uclass_plat (dev);struct button_adc_priv *priv =dev_get_priv (dev);struct ofnode_phandle_args args; -u32 treshold, up_treshold, t; +u32 threshold, up_threshold, t;ofnode node;int ret;@@ -73,12 +73,12 @@ static int button_adc_of_to_plat(struct udevice *dev)return ret; ret =ofnode_read_u32 (dev_ofnode (dev->parent), -"keyup-threshold-microvolt" , &up_treshold); +"keyup-threshold-microvolt" , &up_threshold);if (ret)return ret; ret =ofnode_read_u32 (dev_ofnode (dev),"press-threshold-microvolt" , - &treshold); + &threshold);if (ret)return ret;@@ -87,13 +87,13 @@ static int button_adc_of_to_plat(struct udevice *dev)if (ret)return ret; -if (t > treshold) - up_treshold = t; +if (t > threshold) + up_threshold = t; } priv->channel = args.args[0 ]; - priv->min = treshold; - priv->max = up_treshold; + priv->min = threshold; + priv->max = up_threshold;
Quoted 5 lines
drivers/button/button-adc.c static int button_adc_of_to_plat(struct udevice *dev) · line 99
Quoted 2 lines
drivers/button/button-adc.c +0
-0return ret; }Best regards
Applied to u-boot-amlogic