Skip to contentSkip to conversation

Input: wacom: Remove code duplication

PATCH In review Jason Gerecke 2 participants 2 messages Jun 1, 2012 – Jun 3, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: wacom: Remove code duplication

Replaces code to calculate Intuos5 physical dimensions with a call to an existing function that performs the same task.

---
 drivers/input/tablet/wacom_sys.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/input/tablet/wacom_sys.c +1 -4
index b3a8bd3..50a804d 100644
@@ -1144,10 +1144,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
 			features->device_type = BTN_TOOL_FINGER;
 			features->pktlen = WACOM_PKGLEN_BBTOUCH3;
 
-			features->x_phy =
-				(features->x_max * 100) / features->x_resolution;
-			features->y_phy =
-				(features->y_max * 100) / features->y_resolution;
+			wacom_set_phy_from_res(features);
 
 			features->x_max = 4096;
 			features->y_max = 4096;
Signature · 1 line
1.7.10.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jason Gerecke

Replaces code to calculate Intuos5 physical dimensions with a call to an existing function that performs the same task.

Quoted 23 lines

---
 drivers/input/tablet/wacom_sys.c |    5 +----

 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/input/tablet/wacom_sys.c +1 -5
index b3a8bd3..50a804d 100644
@@ -1144,10 +1144,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
                        features->device_type = BTN_TOOL_FINGER;
                        features->pktlen = WACOM_PKGLEN_BBTOUCH3;
 
-                       features->x_phy =
-                               (features->x_max * 100) / features->x_resolution;
-                       features->y_phy =
-                               (features->y_max * 100) / features->y_resolution;
+                       wacom_set_phy_from_res(features);
 
                        features->x_max = 4096;
                        features->y_max = 4096;
--

1.7.10.3

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html