diff options
author | Ping Cheng <pinglinux@gmail.com> | 2015-04-15 16:54:14 -0700 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-04-23 10:02:21 +0200 |
commit | 3d64f54dd0de57bdbcde4b91495fb8e02c620762 (patch) | |
tree | 42849bb70c0d8af8741e284894702dcdf0edd3cd /drivers/hid/wacom_sys.c | |
parent | 42f4f272746f9e4e3fecb4440dc2429822b6950b (diff) | |
download | op-kernel-dev-3d64f54dd0de57bdbcde4b91495fb8e02c620762.zip op-kernel-dev-3d64f54dd0de57bdbcde4b91495fb8e02c620762.tar.gz |
HID: wacom: move unit and unitExpo initialization to wacom_calculate_res
That is where they belong...
Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/wacom_sys.c')
-rw-r--r-- | drivers/hid/wacom_sys.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index 13d8c8f..b3c6f11 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -1369,6 +1369,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, @@ -1476,12 +1482,6 @@ 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); strlcpy(wacom_wac->name, features->name, sizeof(wacom_wac->name)); |