aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-sysfs.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-06-01 03:25:25 -0400
committerBjorn Helgaas <bhelgaas@google.com>2013-06-01 19:41:25 -0400
commit9a994e8ec7e7d6b1a66c74a683596b0f38f4e345 (patch)
treece48612059e07de77b7ce563b5f0628dc21a7c65 /drivers/pci/pci-sysfs.c
parentcb93b1864088eb833ea9cef2c20f07d1961241b0 (diff)
PCI: Replace strict_strtoul() with kstrtoul()
The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. [bhelgaas: "#define strict_strtoul kstrtoul", so no functional change] Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci-sysfs.c')
-rw-r--r--drivers/pci/pci-sysfs.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 5b4a9d9cd200..0b56e0865f38 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -66,7 +66,7 @@ static ssize_t broken_parity_status_store(struct device *dev,
66 struct pci_dev *pdev = to_pci_dev(dev); 66 struct pci_dev *pdev = to_pci_dev(dev);
67 unsigned long val; 67 unsigned long val;
68 68
69 if (strict_strtoul(buf, 0, &val) < 0) 69 if (kstrtoul(buf, 0, &val) < 0)
70 return -EINVAL; 70 return -EINVAL;
71 71
72 pdev->broken_parity_status = !!val; 72 pdev->broken_parity_status = !!val;
@@ -188,7 +188,7 @@ static ssize_t is_enabled_store(struct device *dev,
188{ 188{
189 struct pci_dev *pdev = to_pci_dev(dev); 189 struct pci_dev *pdev = to_pci_dev(dev);
190 unsigned long val; 190 unsigned long val;
191 ssize_t result = strict_strtoul(buf, 0, &val); 191 ssize_t result = kstrtoul(buf, 0, &val);
192 192
193 if (result < 0) 193 if (result < 0)
194 return result; 194 return result;
@@ -259,7 +259,7 @@ msi_bus_store(struct device *dev, struct device_attribute *attr,
259 struct pci_dev *pdev = to_pci_dev(dev); 259 struct pci_dev *pdev = to_pci_dev(dev);
260 unsigned long val; 260 unsigned long val;
261 261
262 if (strict_strtoul(buf, 0, &val) < 0) 262 if (kstrtoul(buf, 0, &val) < 0)
263 return -EINVAL; 263 return -EINVAL;
264 264
265 /* bad things may happen if the no_msi flag is changed 265 /* bad things may happen if the no_msi flag is changed
@@ -291,7 +291,7 @@ static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf,
291 unsigned long val; 291 unsigned long val;
292 struct pci_bus *b = NULL; 292 struct pci_bus *b = NULL;
293 293
294 if (strict_strtoul(buf, 0, &val) < 0) 294 if (kstrtoul(buf, 0, &val) < 0)
295 return -EINVAL; 295 return -EINVAL;
296 296
297 if (val) { 297 if (val) {
@@ -315,7 +315,7 @@ dev_rescan_store(struct device *dev, struct device_attribute *attr,
315 unsigned long val; 315 unsigned long val;
316 struct pci_dev *pdev = to_pci_dev(dev); 316 struct pci_dev *pdev = to_pci_dev(dev);
317 317
318 if (strict_strtoul(buf, 0, &val) < 0) 318 if (kstrtoul(buf, 0, &val) < 0)
319 return -EINVAL; 319 return -EINVAL;
320 320
321 if (val) { 321 if (val) {
@@ -342,7 +342,7 @@ remove_store(struct device *dev, struct device_attribute *dummy,
342 int ret = 0; 342 int ret = 0;
343 unsigned long val; 343 unsigned long val;
344 344
345 if (strict_strtoul(buf, 0, &val) < 0) 345 if (kstrtoul(buf, 0, &val) < 0)
346 return -EINVAL; 346 return -EINVAL;
347 347
348 /* An attribute cannot be unregistered by one of its own methods, 348 /* An attribute cannot be unregistered by one of its own methods,
@@ -362,7 +362,7 @@ dev_bus_rescan_store(struct device *dev, struct device_attribute *attr,
362 unsigned long val; 362 unsigned long val;
363 struct pci_bus *bus = to_pci_bus(dev); 363 struct pci_bus *bus = to_pci_bus(dev);
364 364
365 if (strict_strtoul(buf, 0, &val) < 0) 365 if (kstrtoul(buf, 0, &val) < 0)
366 return -EINVAL; 366 return -EINVAL;
367 367
368 if (val) { 368 if (val) {
@@ -384,7 +384,7 @@ static ssize_t d3cold_allowed_store(struct device *dev,
384 struct pci_dev *pdev = to_pci_dev(dev); 384 struct pci_dev *pdev = to_pci_dev(dev);
385 unsigned long val; 385 unsigned long val;
386 386
387 if (strict_strtoul(buf, 0, &val) < 0) 387 if (kstrtoul(buf, 0, &val) < 0)
388 return -EINVAL; 388 return -EINVAL;
389 389
390 pdev->d3cold_allowed = !!val; 390 pdev->d3cold_allowed = !!val;
@@ -1236,7 +1236,7 @@ static ssize_t reset_store(struct device *dev,
1236{ 1236{
1237 struct pci_dev *pdev = to_pci_dev(dev); 1237 struct pci_dev *pdev = to_pci_dev(dev);
1238 unsigned long val; 1238 unsigned long val;
1239 ssize_t result = strict_strtoul(buf, 0, &val); 1239 ssize_t result = kstrtoul(buf, 0, &val);
1240 1240
1241 if (result < 0) 1241 if (result < 0)
1242 return result; 1242 return result;