* [PATCH 3/4] HID: wacom: move unit and unitExpo initialization to wacom_calculate_res
@ 2015-04-15 23:54 Ping Cheng
0 siblings, 0 replies; only message in thread
From: Ping Cheng @ 2015-04-15 23:54 UTC (permalink / raw)
To: jkosina; +Cc: linux-input, Ping Cheng
That is where they belong...
Signed-off-by: Ping Cheng <pingc@wacom.com>
---
drivers/hid/wacom_sys.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index ca30eab..855f3b3 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -1365,6 +1365,12 @@ static void wacom_set_default_phy(struct wacom_features *features)
static void wacom_calculate_res(struct wacom_features *features)
{
+ /* set unit to "100th of a mm" for devices not reported by HID */
+ if (!features->unit) {
+ features->unit = 0x11;
+ features->unitExpo = -3;
+ }
+
features->x_resolution = wacom_calc_hid_res(features->x_max,
features->x_phy,
features->unit,
@@ -1505,16 +1511,8 @@ static int wacom_probe(struct hid_device *hdev,
wacom_retrieve_hid_descriptor(hdev, features);
wacom_setup_device_quirks(wacom);
-
- /* set unit to "100th of a mm" for devices not reported by HID */
- if (!features->unit) {
- features->unit = 0x11;
- features->unitExpo = -3;
- }
wacom_calculate_res(features);
-
wacom_update_name(wacom);
-
error = wacom_add_shared_data(hdev);
if (error)
goto fail_shared_data;
--
1.9.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-04-15 23:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-15 23:54 [PATCH 3/4] HID: wacom: move unit and unitExpo initialization to wacom_calculate_res Ping Cheng
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.