From patchwork Sat Jun 1 07:09:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 2647231 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id A298EDF215 for ; Sat, 1 Jun 2013 07:09:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752594Ab3FAHJQ (ORCPT ); Sat, 1 Jun 2013 03:09:16 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:55224 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751976Ab3FAHJP (ORCPT ); Sat, 1 Jun 2013 03:09:15 -0400 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MNP0041MD7E4JB0@mailout2.samsung.com> for linux-input@vger.kernel.org; Sat, 01 Jun 2013 16:09:14 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.48]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 50.FA.29708.A1E99A15; Sat, 01 Jun 2013 16:09:14 +0900 (KST) X-AuditID: cbfee690-b7f6f6d00000740c-cf-51a99e1a9fed Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 94.78.28381.A1E99A15; Sat, 01 Jun 2013 16:09:14 +0900 (KST) Received: from DOJG1HAN03 ([12.23.120.99]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MNP006S5D7EM450@mmp2.samsung.com>; Sat, 01 Jun 2013 16:09:14 +0900 (KST) From: Jingoo Han To: 'Jiri Kosina' Cc: linux-input@vger.kernel.org, Jingoo Han Subject: [PATCH] hid: replace strict_strtoul() with kstrtoul() Date: Sat, 01 Jun 2013 16:09:14 +0900 Message-id: <000301ce5e96$ec617b80$c5247280$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: Ac5eltXq+t3VEEKERWi0REOcMlkzzw== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLIsWRmVeSWpSXmKPExsVy+t8zA12peSsDDd79VLe4vPASq8XuOYtZ LG5++sbqwOzRt2UVo8eZBUfYPT5vkgtgjuKySUnNySxLLdK3S+DK+L9/OmPBI72KE2cWMTYw XlPrYuTkkBAwkfj9aQ4jhC0mceHeerYuRi4OIYFljBLH97SzwRT9mXWUESIxnVHiw+cedgjn F6PEpp9zmECq2ATUJL58OcwOYosIKEtsONcN1s0s4CgxZ+01ZhBbWMBOYsmrxWD1LAKqEkd7 F4DV8ApYSlzeuQnKFpT4MfkeC0SvlsT6nceZIGx5ic1r3jJDXKQgsePsa0aIXXoSr8+dg6oX kdj34h3YpRIC89glphz6zgaxTEDi2+RDQEUcQAlZiU0HoOZIShxccYNlAqPYLCSrZyFZPQvJ 6llIVixgZFnFKJpakFxQnJReZKJXnJhbXJqXrpecn7uJERJVE3Yw3jtgfYgxGWj9RGYp0eR8 YFTmlcQbGpsZWZiamBobmVuakSasJM6r3mIdKCSQnliSmp2aWpBaFF9UmpNafIiRiYNTqoFx 4V9O2ej1B67alIoqfMmaezKiO6bmuZr5ZMGX9a5e16NWhk7YJ1G46FTod+vpd2yuKnd9Skqy ivA7HqjHsWU7+63c589+VbOrnKvJCFd5kne93lkxgGcFJ8eHdIsIFst6/l8PDwq8TlR5sDw1 nudsusiRxB4ntp2me6Tjmz7nLT31brdh6mUlluKMREMt5qLiRADTEt3twAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupileLIzCtJLcpLzFFi42I5/e+xoK7UvJWBBu8PKFtcXniJ1WL3nMUs Fjc/fWN1YPbo27KK0ePMgiPsHp83yQUwRzUw2mSkJqakFimk5iXnp2TmpdsqeQfHO8ebmhkY 6hpaWpgrKeQl5qbaKrn4BOi6ZeYAbVJSKEvMKQUKBSQWFyvp22GaEBripmsB0xih6xsSBNdj ZIAGEtYxZvzfP52x4JFexYkzixgbGK+pdTFyckgImEj8mXWUEcIWk7hwbz1bFyMXh5DAdEaJ D5972CGcX4wSm37OYQKpYhNQk/jy5TA7iC0ioCyx4Vw3G4jNLOAoMWftNWYQW1jATmLJq8Vg 9SwCqhJHexeA1fAKWEpc3rkJyhaU+DH5HgtEr5bE+p3HmSBseYnNa94yQ1ykILHj7GtGiF16 Eq/PnYOqF5HY9+Id4wRGgVlIRs1CMmoWklGzkLQsYGRZxSiaWpBcUJyUnmuoV5yYW1yal66X nJ+7iREcs8+kdjCubLA4xCjAwajEw2uwYkWgEGtiWXFl7iFGCQ5mJRHe/DlAId6UxMqq1KL8 +KLSnNTiQ4zJQJ9OZJYSTc4HppO8knhDYxMzI0sjMwsjE3Nz0oSVxHkPtFoHCgmkJ5akZqem FqQWwWxh4uCUamA0XndE0iNzZWXls7er+euXZxU5edac04++6nReerpevIi6rFJQ9dpSu/zM trjX5ziLDGcc3yU7PTkkwpPDZHOq74m/iypT0hTanVV2fek21+x3z/KOjA4w6Vqz1cd6SdXF l9Ziqzylzvx5EXdtbnThBG/lfaeXpPPnn12nm8ipKTkvko21RYmlOCPRUIu5qDgRADOmdt0d AwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han --- drivers/hid/hid-magicmouse.c | 2 +- drivers/hid/hid-ntrig.c | 12 ++++++------ drivers/hid/hid-roccat-arvo.c | 6 +++--- drivers/hid/hid-roccat-isku.c | 2 +- drivers/hid/hid-roccat-kone.c | 4 ++-- drivers/hid/hid-roccat-koneplus.c | 2 +- drivers/hid/hid-roccat-kovaplus.c | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c index 5bc3734..a32f5a2 100644 --- a/drivers/hid/hid-magicmouse.c +++ b/drivers/hid/hid-magicmouse.c @@ -36,7 +36,7 @@ MODULE_PARM_DESC(emulate_scroll_wheel, "Emulate a scroll wheel"); static unsigned int scroll_speed = 32; static int param_set_scroll_speed(const char *val, struct kernel_param *kp) { unsigned long speed; - if (!val || strict_strtoul(val, 0, &speed) || speed > 63) + if (!val || kstrtoul(val, 0, &speed) || speed > 63) return -EINVAL; scroll_speed = speed; return 0; diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c index ef95102..98d1fdf 100644 --- a/drivers/hid/hid-ntrig.c +++ b/drivers/hid/hid-ntrig.c @@ -237,7 +237,7 @@ static ssize_t set_min_width(struct device *dev, unsigned long val; - if (strict_strtoul(buf, 0, &val)) + if (kstrtoul(buf, 0, &val)) return -EINVAL; if (val > nd->sensor_physical_width) @@ -272,7 +272,7 @@ static ssize_t set_min_height(struct device *dev, unsigned long val; - if (strict_strtoul(buf, 0, &val)) + if (kstrtoul(buf, 0, &val)) return -EINVAL; if (val > nd->sensor_physical_height) @@ -306,7 +306,7 @@ static ssize_t set_activate_slack(struct device *dev, unsigned long val; - if (strict_strtoul(buf, 0, &val)) + if (kstrtoul(buf, 0, &val)) return -EINVAL; if (val > 0x7f) @@ -341,7 +341,7 @@ static ssize_t set_activation_width(struct device *dev, unsigned long val; - if (strict_strtoul(buf, 0, &val)) + if (kstrtoul(buf, 0, &val)) return -EINVAL; if (val > nd->sensor_physical_width) @@ -377,7 +377,7 @@ static ssize_t set_activation_height(struct device *dev, unsigned long val; - if (strict_strtoul(buf, 0, &val)) + if (kstrtoul(buf, 0, &val)) return -EINVAL; if (val > nd->sensor_physical_height) @@ -411,7 +411,7 @@ static ssize_t set_deactivate_slack(struct device *dev, unsigned long val; - if (strict_strtoul(buf, 0, &val)) + if (kstrtoul(buf, 0, &val)) return -EINVAL; /* diff --git a/drivers/hid/hid-roccat-arvo.c b/drivers/hid/hid-roccat-arvo.c index 327f9b8..071ee9e 100644 --- a/drivers/hid/hid-roccat-arvo.c +++ b/drivers/hid/hid-roccat-arvo.c @@ -59,7 +59,7 @@ static ssize_t arvo_sysfs_set_mode_key(struct device *dev, unsigned long state; int retval; - retval = strict_strtoul(buf, 10, &state); + retval = kstrtoul(buf, 10, &state); if (retval) return retval; @@ -107,7 +107,7 @@ static ssize_t arvo_sysfs_set_key_mask(struct device *dev, unsigned long key_mask; int retval; - retval = strict_strtoul(buf, 10, &key_mask); + retval = kstrtoul(buf, 10, &key_mask); if (retval) return retval; @@ -159,7 +159,7 @@ static ssize_t arvo_sysfs_set_actual_profile(struct device *dev, unsigned long profile; int retval; - retval = strict_strtoul(buf, 10, &profile); + retval = kstrtoul(buf, 10, &profile); if (retval) return retval; diff --git a/drivers/hid/hid-roccat-isku.c b/drivers/hid/hid-roccat-isku.c index 8023751..5dd0ea4 100644 --- a/drivers/hid/hid-roccat-isku.c +++ b/drivers/hid/hid-roccat-isku.c @@ -82,7 +82,7 @@ static ssize_t isku_sysfs_set_actual_profile(struct device *dev, isku = hid_get_drvdata(dev_get_drvdata(dev)); usb_dev = interface_to_usbdev(to_usb_interface(dev)); - retval = strict_strtoul(buf, 10, &profile); + retval = kstrtoul(buf, 10, &profile); if (retval) return retval; diff --git a/drivers/hid/hid-roccat-kone.c b/drivers/hid/hid-roccat-kone.c index 7fae070..00ab287 100644 --- a/drivers/hid/hid-roccat-kone.c +++ b/drivers/hid/hid-roccat-kone.c @@ -456,7 +456,7 @@ static ssize_t kone_sysfs_set_tcu(struct device *dev, kone = hid_get_drvdata(dev_get_drvdata(dev)); usb_dev = interface_to_usbdev(to_usb_interface(dev)); - retval = strict_strtoul(buf, 10, &state); + retval = kstrtoul(buf, 10, &state); if (retval) return retval; @@ -545,7 +545,7 @@ static ssize_t kone_sysfs_set_startup_profile(struct device *dev, kone = hid_get_drvdata(dev_get_drvdata(dev)); usb_dev = interface_to_usbdev(to_usb_interface(dev)); - retval = strict_strtoul(buf, 10, &new_startup_profile); + retval = kstrtoul(buf, 10, &new_startup_profile); if (retval) return retval; diff --git a/drivers/hid/hid-roccat-koneplus.c b/drivers/hid/hid-roccat-koneplus.c index 6a48fa3..26b9663 100644 --- a/drivers/hid/hid-roccat-koneplus.c +++ b/drivers/hid/hid-roccat-koneplus.c @@ -246,7 +246,7 @@ static ssize_t koneplus_sysfs_set_actual_profile(struct device *dev, koneplus = hid_get_drvdata(dev_get_drvdata(dev)); usb_dev = interface_to_usbdev(to_usb_interface(dev)); - retval = strict_strtoul(buf, 10, &profile); + retval = kstrtoul(buf, 10, &profile); if (retval) return retval; diff --git a/drivers/hid/hid-roccat-kovaplus.c b/drivers/hid/hid-roccat-kovaplus.c index b8b3778..c2a17e4 100644 --- a/drivers/hid/hid-roccat-kovaplus.c +++ b/drivers/hid/hid-roccat-kovaplus.c @@ -282,7 +282,7 @@ static ssize_t kovaplus_sysfs_set_actual_profile(struct device *dev, kovaplus = hid_get_drvdata(dev_get_drvdata(dev)); usb_dev = interface_to_usbdev(to_usb_interface(dev)); - retval = strict_strtoul(buf, 10, &profile); + retval = kstrtoul(buf, 10, &profile); if (retval) return retval;