Commit 3e9c010c authored by Adam Belay's avatar Adam Belay

Interface Changes

A few minor revisions.  Simpifies a few commands and adds config mode 
information.
parent 1f11a02c
...@@ -332,11 +332,18 @@ static ssize_t pnp_show_current_resources(struct device *dmdev, char *buf) ...@@ -332,11 +332,18 @@ static ssize_t pnp_show_current_resources(struct device *dmdev, char *buf)
buffer->buffer = buf; buffer->buffer = buf;
buffer->curr = buffer->buffer; buffer->curr = buffer->buffer;
pnp_printf(buffer,"mode = ");
if (dev->config_mode & PNP_CONFIG_MANUAL)
pnp_printf(buffer,"manual\n");
else
pnp_printf(buffer,"auto\n");
pnp_printf(buffer,"state = "); pnp_printf(buffer,"state = ");
if (dev->active) if (dev->active)
pnp_printf(buffer,"active\n"); pnp_printf(buffer,"active\n");
else else
pnp_printf(buffer,"disabled\n"); pnp_printf(buffer,"disabled\n");
for (i = 0; i < PNP_MAX_PORT; i++) { for (i = 0; i < PNP_MAX_PORT; i++) {
if (pnp_port_valid(dev, i)) { if (pnp_port_valid(dev, i)) {
pnp_printf(buffer,"io"); pnp_printf(buffer,"io");
...@@ -402,13 +409,13 @@ pnp_set_current_resources(struct device * dmdev, const char * ubuf, size_t count ...@@ -402,13 +409,13 @@ pnp_set_current_resources(struct device * dmdev, const char * ubuf, size_t count
retval = pnp_activate_dev(dev); retval = pnp_activate_dev(dev);
goto done; goto done;
} }
if (!strnicmp(buf,"auto-config",11)) { if (!strnicmp(buf,"auto",4)) {
if (dev->active) if (dev->active)
goto done; goto done;
retval = pnp_auto_config_dev(dev); retval = pnp_auto_config_dev(dev);
goto done; goto done;
} }
if (!strnicmp(buf,"clear-config",12)) { if (!strnicmp(buf,"clear",5)) {
if (dev->active) if (dev->active)
goto done; goto done;
spin_lock(&pnp_lock); spin_lock(&pnp_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment