From: Alexey Dobriyan <adobriyan@gmail.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, adobriyan@gmail.com
Subject: [PATCH 43/52] kstrtox: convert sound/
Date: Sat, 5 Feb 2011 16:20:46 +0200 [thread overview]
Message-ID: <1296915654-7458-43-git-send-email-adobriyan@gmail.com> (raw)
In-Reply-To: <1296915654-7458-1-git-send-email-adobriyan@gmail.com>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
sound/drivers/dummy.c | 2 +-
sound/pci/hda/hda_hwdep.c | 10 ++++------
sound/pci/hda/patch_sigmatel.c | 7 ++-----
sound/soc/codecs/wm8962.c | 4 ++--
sound/soc/soc-core.c | 6 +++---
5 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index 7f41990..d3b1a02 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -953,7 +953,7 @@ static void dummy_proc_write(struct snd_info_entry *entry,
if (i >= ARRAY_SIZE(fields))
continue;
snd_info_get_str(item, ptr, sizeof(item));
- if (strict_strtoull(item, 0, &val))
+ if (kstrtoull(item, 0, &val))
continue;
if (fields[i].size == sizeof(int))
*get_dummy_int_ptr(dummy, fields[i].offset) = val;
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c
index bf3ced5..ecc7edb 100644
--- a/sound/pci/hda/hda_hwdep.c
+++ b/sound/pci/hda/hda_hwdep.c
@@ -293,11 +293,11 @@ static ssize_t type##_store(struct device *dev, \
{ \
struct snd_hwdep *hwdep = dev_get_drvdata(dev); \
struct hda_codec *codec = hwdep->private_data; \
- unsigned long val; \
- int err = strict_strtoul(buf, 0, &val); \
+ int err; \
+ \
+ err = kstrtou32(buf, 0, &codec->type); \
if (err < 0) \
return err; \
- codec->type = val; \
return count; \
}
@@ -699,9 +699,7 @@ static void parse_chip_name_mode(char *buf, struct hda_bus *bus,
static void parse_##name##_mode(char *buf, struct hda_bus *bus, \
struct hda_codec **codecp) \
{ \
- unsigned long val; \
- if (!strict_strtoul(buf, 0, &val)) \
- (*codecp)->name = val; \
+ kstrtou32(buf, 0, &(*codecp)->name); \
}
DEFINE_PARSE_ID_MODE(vendor_id);
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 9ea48b4..4ebbe64 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -4194,16 +4194,13 @@ static void stac_toggle_power_map(struct hda_codec *codec, hda_nid_t nid,
int enable);
static inline int get_int_hint(struct hda_codec *codec, const char *key,
- int *valp)
+ unsigned int *val)
{
const char *p;
p = snd_hda_get_hint(codec, key);
if (p) {
- unsigned long val;
- if (!strict_strtoul(p, 0, &val)) {
- *valp = val;
+ if (kstrtouint(p, 0, val) == 0)
return 1;
- }
}
return 0;
}
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index b9cb1fc..996676f 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3501,10 +3501,10 @@ static ssize_t wm8962_beep_set(struct device *dev,
const char *buf, size_t count)
{
struct wm8962_priv *wm8962 = dev_get_drvdata(dev);
- long int time;
+ int time;
int ret;
- ret = strict_strtol(buf, 10, &time);
+ ret = kstrtoint(buf, 10, &time);
if (ret != 0)
return ret;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index bac7291..75f278d 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -151,7 +151,7 @@ static ssize_t pmdown_time_set(struct device *dev,
container_of(dev, struct snd_soc_pcm_runtime, dev);
int ret;
- ret = strict_strtol(buf, 10, &rtd->pmdown_time);
+ ret = kstrtol(buf, 10, &rtd->pmdown_time);
if (ret)
return ret;
@@ -188,7 +188,7 @@ static ssize_t codec_reg_write_file(struct file *file,
char buf[32];
int buf_size;
char *start = buf;
- unsigned long reg, value;
+ u32 reg, value;
int step = 1;
struct snd_soc_codec *codec = file->private_data;
@@ -207,7 +207,7 @@ static ssize_t codec_reg_write_file(struct file *file,
return -EINVAL;
while (*start == ' ')
start++;
- if (strict_strtoul(start, 16, &value))
+ if (kstrtou32(start, 16, &value))
return -EINVAL;
snd_soc_write(codec, reg, value);
return buf_size;
--
1.7.3.4
next prev parent reply other threads:[~2011-02-05 14:24 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-05 14:20 [PATCH 01/52] kstrtox: converting strings to integers done (hopefully) right Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 02/52] kstrtox: convert kernel/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 03/52] kstrtox: convert kernel/trace/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 04/52] kstrtox: convert mm/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 05/52] kstrtox: convert block/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 06/52] kstrtox: convert security/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 07/52] kstrtox: convert fs/fuse/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 08/52] kstrtox: convert fs/nfs/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 09/52] kstrtox: convert fs/proc/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 10/52] kstrtox: convert drivers/acpi/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 11/52] kstrtox: convert drivers/ata/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 12/52] kstrtox: convert drivers/base/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 13/52] kstrtox: convert drivers/block/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 14/52] kstrtox: convert drivers/bluetooth/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 15/52] kstrtox: convert drivers/clocksource/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 16/52] kstrtox: convert drivers/edac/ Alexey Dobriyan
2011-02-05 17:34 ` Borislav Petkov
2011-02-06 18:52 ` Alexey Dobriyan
2011-02-07 9:43 ` Borislav Petkov
2011-02-05 14:20 ` [PATCH 17/52] kstrtox: convert drivers/gpio/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 18/52] kstrtox: convert drivers/gpu/drm/nouveau/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 19/52] kstrtox: convert drivers/hid/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 20/52] kstrtox: convert drivers/hwmon/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 21/52] kstrtox: convert drivers/ide/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 22/52] kstrtox: convert drivers/infiniband/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 23/52] kstrtox: convert drivers/input/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 24/52] kstrtox: convert drivers/isdn/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 25/52] kstrtox: convert drivers/leds/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 26/52] kstrtox: convert drivers/macintosh/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 27/52] kstrtox: convert drivers/md/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 28/52] kstrtox: convert drivers/mfd/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 29/52] kstrtox: convert drivers/misc/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 30/52] kstrtox: convert drivers/mmc/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 31/52] kstrtox: convert drivers/net/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 32/52] kstrtox: convert drivers/net/wireless/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 33/52] kstrtox: convert drivers/pci/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 34/52] kstrtox: convert drivers/power/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 35/52] kstrtox: convert drivers/regulator/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 36/52] kstrtox: convert drivers/rtc/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 37/52] kstrtox: convert drivers/scsi/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 38/52] kstrtox: convert drivers/ssb/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 39/52] kstrtox: convert drivers/target/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 40/52] kstrtox: convert drivers/usb/ Alexey Dobriyan
2011-04-14 10:31 ` [40/52] " Michal Nazarewicz
2011-02-05 14:20 ` [PATCH 41/52] kstrtox: convert drivers/video/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 42/52] kstrtox: convert drivers/w1/ Alexey Dobriyan
2011-02-05 14:20 ` Alexey Dobriyan [this message]
2011-02-05 14:20 ` [PATCH 44/52] kstrtox: convert net/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 45/52] kstrtox: convert arm Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 46/52] kstrtox: convert microblaze Alexey Dobriyan
2011-02-10 13:55 ` Michal Simek
2011-02-05 14:20 ` [PATCH 47/52] kstrtox: convert mips Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 48/52] kstrtox: convert powerpc Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 49/52] kstrtox: convert s390 Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 50/52] kstrtox: convert tile Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 51/52] kstrtox: convert x86 Alexey Dobriyan
2011-02-05 14:33 ` [PATCH 01/52] kstrtox: converting strings to integers done (hopefully) right Geert Uytterhoeven
2011-02-05 14:40 ` Alexey Dobriyan
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=1296915654-7458-43-git-send-email-adobriyan@gmail.com \
--to=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/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).