linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesse Sung <jesse.sung@canonical.com>
To: linux-input@vger.kernel.org, Rafi Rubin <rafi@seas.upenn.edu>,
	Jiri Kosina <jkosina@suse.cz>
Subject: [PATCH resend] N-Trig: change default value of logical/physical width/height to 1
Date: Tue, 25 Sep 2012 18:51:07 +0800	[thread overview]
Message-ID: <1348570267-15322-1-git-send-email-jesse.sung@canonical.com> (raw)
In-Reply-To: <1347956828-5967-1-git-send-email-jesse.sung@canonical.com>

From: Wen-chien Jesse Sung <jesse.sung@canonical.com>

Since something will be divided by these variables in
show_min_width()/show_min_height() and show_activate_width()/
show_activate_height(), a divided error would be triggered if
they are zero.

Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
---
 drivers/hid/hid-ntrig.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c
index 9fae2eb..86a969f 100644
--- a/drivers/hid/hid-ntrig.c
+++ b/drivers/hid/hid-ntrig.c
@@ -882,10 +882,10 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
 	nd->activate_slack = activate_slack;
 	nd->act_state = activate_slack;
 	nd->deactivate_slack = -deactivate_slack;
-	nd->sensor_logical_width = 0;
-	nd->sensor_logical_height = 0;
-	nd->sensor_physical_width = 0;
-	nd->sensor_physical_height = 0;
+	nd->sensor_logical_width = 1;
+	nd->sensor_logical_height = 1;
+	nd->sensor_physical_width = 1;
+	nd->sensor_physical_height = 1;
 
 	hid_set_drvdata(hdev, nd);
 
-- 
1.7.9.5


  reply	other threads:[~2012-09-25 10:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-18  8:27 [PATCH] N-Trig: change default value of logical/physical width/height to 1 Jesse Sung
2012-09-25 10:51 ` Jesse Sung [this message]
2012-09-25 12:00   ` [PATCH resend] " Rafi Rubin
2012-09-25 13:23     ` Jiri Kosina
2012-09-25 16:11       ` Jesse Sung

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=1348570267-15322-1-git-send-email-jesse.sung@canonical.com \
    --to=jesse.sung@canonical.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=rafi@seas.upenn.edu \
    /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).