From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Christopher Heiny <cheiny@synaptics.com>
Cc: Linux Input <linux-input@vger.kernel.org>,
Andrew Duggan <aduggan@synaptics.com>,
Vincent Huang <vincent.huang@tw.synaptics.com>,
Vivian Ly <vly@synaptics.com>,
Daniel Rosenberg <daniel.rosenberg@synaptics.com>,
Jean Delvare <khali@linux-fr.org>,
Joerie de Gram <j.de.gram@gmail.com>,
Linus Walleij <linus.walleij@stericsson.com>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>
Subject: Re: [PATCH] input: synaptics-rmi4 - fix F01 DOM formatting
Date: Thu, 9 Jan 2014 22:27:53 -0800 [thread overview]
Message-ID: <20140110062753.GA24123@core.coreip.homeip.net> (raw)
In-Reply-To: <1389298893-4043-1-git-send-email-cheiny@synaptics.com>
On Thu, Jan 09, 2014 at 12:21:33PM -0800, Christopher Heiny wrote:
> Use a sensible format string for the date of manufacture formatting.
>
> Signed-off-by: Christopher Heiny <cheiny@synaptics.com>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Applied, thank you.
>
> ---
>
> drivers/input/rmi4/rmi_f01.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/input/rmi4/rmi_f01.c b/drivers/input/rmi4/rmi_f01.c
> index 1cb11ea..9e6a578 100644
> --- a/drivers/input/rmi4/rmi_f01.c
> +++ b/drivers/input/rmi4/rmi_f01.c
> @@ -50,7 +50,7 @@ struct f01_basic_properties {
> bool has_lts;
> bool has_adjustable_doze;
> bool has_adjustable_doze_holdoff;
> - char dom[9]; /* YYYYMMDD + '\0' */
> + char dom[11]; /* YYYY/MM/DD + '\0' */
> u8 product_id[RMI_PRODUCT_ID_LENGTH + 1];
> u16 productinfo;
> };
> @@ -190,8 +190,7 @@ static int rmi_f01_read_properties(struct rmi_device *rmi_dev,
> props->has_adjustable_doze_holdoff =
> basic_query[1] & RMI_F01_QRY1_HAS_ADJ_DOZE_HOFF;
>
> - snprintf(props->dom, sizeof(props->dom),
> - "20%02x%02x%02x",
> + snprintf(props->dom, sizeof(props->dom), "20%02d/%02d/%02d",
> basic_query[5] & RMI_F01_QRY5_YEAR_MASK,
> basic_query[6] & RMI_F01_QRY6_MONTH_MASK,
> basic_query[7] & RMI_F01_QRY7_DAY_MASK);
--
Dmitry
prev parent reply other threads:[~2014-01-10 6:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 20:21 [PATCH] input: synaptics-rmi4 - fix F01 DOM formatting Christopher Heiny
2014-01-10 6:27 ` Dmitry Torokhov [this message]
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=20140110062753.GA24123@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=aduggan@synaptics.com \
--cc=benjamin.tissoires@redhat.com \
--cc=cheiny@synaptics.com \
--cc=daniel.rosenberg@synaptics.com \
--cc=j.de.gram@gmail.com \
--cc=khali@linux-fr.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-input@vger.kernel.org \
--cc=vincent.huang@tw.synaptics.com \
--cc=vly@synaptics.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).