From: Neil Armstrong <narmstrong@baylibre.com> To: u-boot@lists.denx.de Subject: [PATCH] button: adc: fix treshold typo Date: Tue, 23 Feb 2021 16:10:40 +0100 [thread overview] Message-ID: <20210223151040.2201981-1-narmstrong@baylibre.com> (raw) 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 <trini@konsulko.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> --- drivers/button/button-adc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/button/button-adc.c b/drivers/button/button-adc.c index eed86564fb..fd896c76f9 100644 --- a/drivers/button/button-adc.c +++ b/drivers/button/button-adc.c @@ -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; } -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: "Neil Armstrong" <narmstrong@baylibre.com> To: trini@konsulko.com Cc: u-boot@lists.denx.de, m.szyprowski@samsung.com, u-boot-amlogic@groups.io, Neil Armstrong <narmstrong@baylibre.com> Subject: [PATCH] button: adc: fix treshold typo Date: Tue, 23 Feb 2021 16:10:40 +0100 [thread overview] Message-ID: <20210223151040.2201981-1-narmstrong@baylibre.com> (raw) 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 <trini@konsulko.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> --- drivers/button/button-adc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/button/button-adc.c b/drivers/button/button-adc.c index eed86564fb..fd896c76f9 100644 --- a/drivers/button/button-adc.c +++ b/drivers/button/button-adc.c @@ -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; } -- 2.25.1
next reply other threads:[~2021-02-23 15:10 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <CGME20210223151049eucas1p2f45c23f278c93b83e1a0812e4370b090@eucas1p2.samsung.com> 2021-02-23 15:10 ` Neil Armstrong [this message] 2021-02-23 15:10 ` [PATCH] button: adc: fix treshold typo Neil Armstrong 2021-02-23 18:18 ` Marek Szyprowski 2021-03-08 9:44 ` Neil Armstrong 2021-03-08 9:44 ` Neil Armstrong
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210223151040.2201981-1-narmstrong@baylibre.com \ --to=narmstrong@baylibre.com \ --cc=u-boot@lists.denx.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.