diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-04-28 18:34:09 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-04-29 03:22:22 -0400 |
commit | f44900020926b2cb06b87f0f52643d6285514fc3 (patch) | |
tree | 081893ba769b0f89e03832995839cfea30fcf5f9 /drivers/pnp/interface.c | |
parent | 81b5c75f0ed22a93c3da00650d0898eec56e1d62 (diff) |
PNP: add pnp_init_resources(struct pnp_dev *) interface
Add pnp_init_resources(struct pnp_dev *) to replace
pnp_init_resource_table(), which takes a pointer to the
pnp_resource_table itself. Passing only the pnp_dev * reduces
the possibility for error in the caller and removes the
pnp_resource_table implementation detail from the interface.
Even though pnp_init_resource_table() is exported, I did not
export pnp_init_resources() because it is used only by the PNP
core.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-By: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/pnp/interface.c')
-rw-r--r-- | drivers/pnp/interface.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c index e882896bdbd7..cdc3ecfde6ef 100644 --- a/drivers/pnp/interface.c +++ b/drivers/pnp/interface.c | |||
@@ -351,14 +351,14 @@ pnp_set_current_resources(struct device *dmdev, struct device_attribute *attr, | |||
351 | if (!strnicmp(buf, "auto", 4)) { | 351 | if (!strnicmp(buf, "auto", 4)) { |
352 | if (dev->active) | 352 | if (dev->active) |
353 | goto done; | 353 | goto done; |
354 | pnp_init_resource_table(&dev->res); | 354 | pnp_init_resources(dev); |
355 | retval = pnp_auto_config_dev(dev); | 355 | retval = pnp_auto_config_dev(dev); |
356 | goto done; | 356 | goto done; |
357 | } | 357 | } |
358 | if (!strnicmp(buf, "clear", 5)) { | 358 | if (!strnicmp(buf, "clear", 5)) { |
359 | if (dev->active) | 359 | if (dev->active) |
360 | goto done; | 360 | goto done; |
361 | pnp_init_resource_table(&dev->res); | 361 | pnp_init_resources(dev); |
362 | goto done; | 362 | goto done; |
363 | } | 363 | } |
364 | if (!strnicmp(buf, "get", 3)) { | 364 | if (!strnicmp(buf, "get", 3)) { |
@@ -373,7 +373,7 @@ pnp_set_current_resources(struct device *dmdev, struct device_attribute *attr, | |||
373 | if (dev->active) | 373 | if (dev->active) |
374 | goto done; | 374 | goto done; |
375 | buf += 3; | 375 | buf += 3; |
376 | pnp_init_resource_table(&dev->res); | 376 | pnp_init_resources(dev); |
377 | mutex_lock(&pnp_res_mutex); | 377 | mutex_lock(&pnp_res_mutex); |
378 | while (1) { | 378 | while (1) { |
379 | while (isspace(*buf)) | 379 | while (isspace(*buf)) |