pnp: Remove now plain wrappers for default PnP functions

After removing the enter()/exit() functions for configuration mode,
most wrappers for our standard PnP functions just call the underlying
default implementation.

Remove those with a little cocci:
    @ op_match @
    identifier op;
    identifier pnp_op =~ "^pnp_((alt_|)enable|(set|enable)_resources)$";
    type device_t;
    identifier dev;
    @@
     static void op(device_t dev) { pnp_op(dev); }

    @@
    identifier op_match.op;
    @@
    -op(...) {...}

    /* Three rules to match the alignment, hmmp... */
    @@
    identifier op_match.op, op_match.pnp_op;
    identifier ops;
    @@
     struct device_operations ops = {
    -        .set_resources    = op,
    +        .set_resources    = pnp_op,
     };

    @@
    identifier op_match.op, op_match.pnp_op;
    identifier ops;
    @@
     struct device_operations ops = {
    -        .enable_resources = op,
    +        .enable_resources = pnp_op,
     };

    @@
    identifier op_match.op, op_match.pnp_op;
    identifier ops;
    @@
     struct device_operations ops = {
    -        .enable           = op,
    +        .enable           = pnp_op,
     };

Change-Id: Idc0e52c7e3600a01f3b6a4e17763557b271b481e
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: http://review.coreboot.org/3483
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Nico Huber 2013-06-15 19:58:35 +02:00 committed by Stefan Reinauer
parent 13dc976a52
commit 0b2ee93910
29 changed files with 84 additions and 532 deletions

View File

@ -45,21 +45,6 @@ static void f71805f_init(device_t dev)
/* TODO: Might potentially need code for HWM or FDC etc. */ /* TODO: Might potentially need code for HWM or FDC etc. */
} }
static void f71805f_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void f71805f_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void f71805f_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = pnp_enter_conf_state, .enter_conf_mode = pnp_enter_conf_state,
.exit_conf_mode = pnp_exit_conf_state, .exit_conf_mode = pnp_exit_conf_state,
@ -67,9 +52,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = f71805f_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = f71805f_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = f71805f_pnp_enable, .enable = pnp_alt_enable,
.init = f71805f_init, .init = f71805f_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -46,21 +46,6 @@ static void f71859_init(device_t dev)
/* TODO: Might potentially need code for HWM or FDC etc. */ /* TODO: Might potentially need code for HWM or FDC etc. */
} }
static void f71859_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void f71859_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void f71859_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = pnp_enter_conf_state, .enter_conf_mode = pnp_enter_conf_state,
.exit_conf_mode = pnp_exit_conf_state, .exit_conf_mode = pnp_exit_conf_state,
@ -68,9 +53,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = f71859_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = f71859_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = f71859_pnp_enable, .enable = pnp_alt_enable,
.init = f71859_init, .init = f71859_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -55,21 +55,6 @@ static void f71863fg_init(device_t dev)
} }
} }
static void f71863fg_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void f71863fg_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void f71863fg_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = pnp_enter_conf_state, .enter_conf_mode = pnp_enter_conf_state,
.exit_conf_mode = pnp_exit_conf_state, .exit_conf_mode = pnp_exit_conf_state,
@ -77,9 +62,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = f71863fg_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = f71863fg_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = f71863fg_pnp_enable, .enable = pnp_alt_enable,
.init = f71863fg_init, .init = f71863fg_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -52,21 +52,6 @@ static void f71872_init(device_t dev)
} }
} }
static void f71872_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void f71872_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void f71872_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = pnp_enter_conf_state, .enter_conf_mode = pnp_enter_conf_state,
.exit_conf_mode = pnp_exit_conf_state, .exit_conf_mode = pnp_exit_conf_state,
@ -74,9 +59,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = f71872_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = f71872_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = f71872_pnp_enable, .enable = pnp_alt_enable,
.init = f71872_init, .init = f71872_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -53,21 +53,6 @@ static void f71889_init(device_t dev)
} }
} }
static void f71889_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void f71889_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void f71889_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = pnp_enter_conf_state, .enter_conf_mode = pnp_enter_conf_state,
.exit_conf_mode = pnp_exit_conf_state, .exit_conf_mode = pnp_exit_conf_state,
@ -75,9 +60,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = f71889_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = f71889_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = f71889_pnp_enable, .enable = pnp_alt_enable,
.init = f71889_init, .init = f71889_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -52,21 +52,6 @@ static void f81865f_init(device_t dev)
} }
} }
static void f81865f_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void f81865f_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void f81865f_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = pnp_enter_conf_state, .enter_conf_mode = pnp_enter_conf_state,
.exit_conf_mode = pnp_exit_conf_state, .exit_conf_mode = pnp_exit_conf_state,
@ -74,9 +59,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = f81865f_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = f81865f_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = f81865f_pnp_enable, .enable = pnp_alt_enable,
.init = f81865f_init, .init = f81865f_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -43,21 +43,6 @@ static void i3100_init(device_t dev)
return; return;
} }
static void i3100_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void i3100_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void i3100_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = pnp_enter_ext_func_mode, .enter_conf_mode = pnp_enter_ext_func_mode,
.exit_conf_mode = pnp_exit_ext_func_mode, .exit_conf_mode = pnp_exit_ext_func_mode,
@ -65,9 +50,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = i3100_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = i3100_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = i3100_pnp_enable, .enable = pnp_alt_enable,
.init = i3100_init, .init = i3100_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -72,21 +72,6 @@ static void it8712f_init(device_t dev)
} }
} }
static void it8712f_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void it8712f_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void it8712f_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = pnp_enter_ext_func_mode, .enter_conf_mode = pnp_enter_ext_func_mode,
.exit_conf_mode = pnp_exit_ext_func_mode, .exit_conf_mode = pnp_exit_ext_func_mode,
@ -94,9 +79,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = it8712f_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = it8712f_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = it8712f_pnp_enable, .enable = pnp_alt_enable,
.init = it8712f_init, .init = it8712f_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -96,21 +96,6 @@ static void it8716f_init(device_t dev)
} }
} }
static void it8716f_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void it8716f_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void it8716f_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = pnp_enter_ext_func_mode, .enter_conf_mode = pnp_enter_ext_func_mode,
.exit_conf_mode = pnp_exit_ext_func_mode, .exit_conf_mode = pnp_exit_ext_func_mode,
@ -118,9 +103,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = it8716f_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = it8716f_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = it8716f_pnp_enable, .enable = pnp_alt_enable,
.init = it8716f_init, .init = it8716f_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -188,21 +188,6 @@ static void it8772f_init(device_t dev)
} }
} }
static void it8772f_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void it8772f_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void it8772f_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = pnp_enter_ext_func_mode, .enter_conf_mode = pnp_enter_ext_func_mode,
.exit_conf_mode = pnp_exit_ext_func_mode, .exit_conf_mode = pnp_exit_ext_func_mode,
@ -210,9 +195,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = it8772f_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = it8772f_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = it8772f_pnp_enable, .enable = pnp_alt_enable,
.init = it8772f_init, .init = it8772f_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -38,21 +38,6 @@ static void nct5104d_init(device_t dev)
{ {
} }
static void nct5104d_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void nct5104d_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void nct5104d_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = pnp_enter_exteded_mode, .enter_conf_mode = pnp_enter_exteded_mode,
.exit_conf_mode = pnp_exit_extended_mode, .exit_conf_mode = pnp_exit_extended_mode,
@ -60,9 +45,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = nct5104d_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = nct5104d_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = nct5104d_pnp_enable, .enable = pnp_alt_enable,
.init = nct5104d_init, .init = nct5104d_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -33,9 +33,6 @@
/* Forward declarations */ /* Forward declarations */
static void enable_dev(device_t dev); static void enable_dev(device_t dev);
static void kbc1100_pnp_set_resources(device_t dev);
static void kbc1100_pnp_enable_resources(device_t dev);
static void kbc1100_pnp_enable(device_t dev);
static void kbc1100_init(device_t dev); static void kbc1100_init(device_t dev);
static void pnp_enter_conf_state(device_t dev); static void pnp_enter_conf_state(device_t dev);
@ -53,9 +50,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = kbc1100_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = kbc1100_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = kbc1100_pnp_enable, .enable = pnp_alt_enable,
.init = kbc1100_init, .init = kbc1100_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };
@ -69,21 +66,6 @@ static void enable_dev(device_t dev)
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info); pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
} }
static void kbc1100_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void kbc1100_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void kbc1100_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static void kbc1100_init(device_t dev) static void kbc1100_init(device_t dev)
{ {
struct superio_smsc_kbc1100_config *conf = dev->chip_info; struct superio_smsc_kbc1100_config *conf = dev->chip_info;

View File

@ -37,9 +37,6 @@
/* Forward declarations */ /* Forward declarations */
static void enable_dev(device_t dev); static void enable_dev(device_t dev);
static void lpc47b272_pnp_set_resources(device_t dev);
static void lpc47b272_pnp_enable_resources(device_t dev);
static void lpc47b272_pnp_enable(device_t dev);
static void lpc47b272_init(device_t dev); static void lpc47b272_init(device_t dev);
static void pnp_enter_conf_state(device_t dev); static void pnp_enter_conf_state(device_t dev);
@ -58,9 +55,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = lpc47b272_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = lpc47b272_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = lpc47b272_pnp_enable, .enable = pnp_alt_enable,
.init = lpc47b272_init, .init = lpc47b272_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };
@ -86,27 +83,6 @@ static void enable_dev(device_t dev)
pnp_dev_info); pnp_dev_info);
} }
/**
* Configure the specified Super I/O device with the resources (I/O space,
* etc.) that have been allocated for it.
*
* @param dev Pointer to structure describing a Super I/O device.
*/
static void lpc47b272_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void lpc47b272_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void lpc47b272_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
/** /**
* Initialize the specified Super I/O device. * Initialize the specified Super I/O device.
* *

View File

@ -78,11 +78,6 @@ static void lpc47b397_init(device_t dev)
} }
} }
static void lpc47b397_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void lpc47b397_pnp_enable_resources(device_t dev) static void lpc47b397_pnp_enable_resources(device_t dev)
{ {
pnp_enable_resources(dev); pnp_enable_resources(dev);
@ -99,11 +94,6 @@ static void lpc47b397_pnp_enable_resources(device_t dev)
pnp_exit_conf_mode(dev); pnp_exit_conf_mode(dev);
} }
static void lpc47b397_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = pnp_enter_conf_state, .enter_conf_mode = pnp_enter_conf_state,
.exit_conf_mode = pnp_exit_conf_state, .exit_conf_mode = pnp_exit_conf_state,
@ -111,9 +101,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = lpc47b397_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = lpc47b397_pnp_enable_resources, .enable_resources = lpc47b397_pnp_enable_resources,
.enable = lpc47b397_pnp_enable, .enable = pnp_alt_enable,
.init = lpc47b397_init, .init = lpc47b397_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };
@ -169,9 +159,9 @@ static struct smbus_bus_operations lops_smbus_bus = {
static struct device_operations ops_hwm = { static struct device_operations ops_hwm = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = lpc47b397_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = lpc47b397_pnp_enable_resources, .enable_resources = lpc47b397_pnp_enable_resources,
.enable = lpc47b397_pnp_enable, .enable = pnp_alt_enable,
.init = lpc47b397_init, .init = lpc47b397_init,
.scan_bus = scan_static_bus, .scan_bus = scan_static_bus,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,

View File

@ -36,9 +36,6 @@
/* Forward declarations */ /* Forward declarations */
static void enable_dev(device_t dev); static void enable_dev(device_t dev);
static void lpc47m10x_pnp_set_resources(device_t dev);
static void lpc47m10x_pnp_enable_resources(device_t dev);
static void lpc47m10x_pnp_enable(device_t dev);
static void lpc47m10x_init(device_t dev); static void lpc47m10x_init(device_t dev);
static void pnp_enter_conf_state(device_t dev); static void pnp_enter_conf_state(device_t dev);
@ -57,9 +54,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = lpc47m10x_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = lpc47m10x_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = lpc47m10x_pnp_enable, .enable = pnp_alt_enable,
.init = lpc47m10x_init, .init = lpc47m10x_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };
@ -85,27 +82,6 @@ static void enable_dev(device_t dev)
pnp_dev_info); pnp_dev_info);
} }
/**
* Configure the specified Super I/O device with the resources (I/O space,
* etc.) that have been allocated for it.
*
* @param dev Pointer to structure describing a Super I/O device.
*/
static void lpc47m10x_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void lpc47m10x_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void lpc47m10x_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
/** /**
* Initialize the specified Super I/O device. * Initialize the specified Super I/O device.
* *

View File

@ -33,9 +33,6 @@
/* Forward declarations */ /* Forward declarations */
static void enable_dev(device_t dev); static void enable_dev(device_t dev);
static void lpc47m15x_pnp_set_resources(device_t dev);
static void lpc47m15x_pnp_enable_resources(device_t dev);
static void lpc47m15x_pnp_enable(device_t dev);
static void lpc47m15x_init(device_t dev); static void lpc47m15x_init(device_t dev);
static void pnp_enter_conf_state(device_t dev); static void pnp_enter_conf_state(device_t dev);
@ -53,9 +50,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = lpc47m15x_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = lpc47m15x_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = lpc47m15x_pnp_enable, .enable = pnp_alt_enable,
.init = lpc47m15x_init, .init = lpc47m15x_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };
@ -74,21 +71,6 @@ static void enable_dev(device_t dev)
ARRAY_SIZE(pnp_dev_info), pnp_dev_info); ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
} }
static void lpc47m15x_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void lpc47m15x_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void lpc47m15x_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static void lpc47m15x_init(device_t dev) static void lpc47m15x_init(device_t dev)
{ {
struct superio_smsc_lpc47m15x_config *conf = dev->chip_info; struct superio_smsc_lpc47m15x_config *conf = dev->chip_info;

View File

@ -43,21 +43,6 @@ static void pnp_exit_conf_state(device_t dev)
outb(0xaa, dev->path.pnp.port); outb(0xaa, dev->path.pnp.port);
} }
static void mec1308_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void mec1308_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void mec1308_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static void mec1308_init(device_t dev) static void mec1308_init(device_t dev)
{ {
struct superio_smsc_mec1308_config *conf = dev->chip_info; struct superio_smsc_mec1308_config *conf = dev->chip_info;
@ -83,9 +68,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = mec1308_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = mec1308_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = mec1308_pnp_enable, .enable = pnp_alt_enable,
.init = mec1308_init, .init = mec1308_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -33,9 +33,6 @@
/* Forward declarations */ /* Forward declarations */
static void enable_dev(device_t dev); static void enable_dev(device_t dev);
static void sch4037_pnp_set_resources(device_t dev);
static void sch4037_pnp_enable_resources(device_t dev);
static void sch4037_pnp_enable(device_t dev);
static void sch4037_init(device_t dev); static void sch4037_init(device_t dev);
static void pnp_enter_conf_state(device_t dev); static void pnp_enter_conf_state(device_t dev);
@ -53,9 +50,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = sch4037_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = sch4037_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = sch4037_pnp_enable, .enable = pnp_alt_enable,
.init = sch4037_init, .init = sch4037_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };
@ -70,21 +67,6 @@ static void enable_dev(device_t dev)
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info); pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
} }
static void sch4037_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void sch4037_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void sch4037_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static void sch4037_init(device_t dev) static void sch4037_init(device_t dev)
{ {
struct superio_smsc_sch4037_config *conf = dev->chip_info; struct superio_smsc_sch4037_config *conf = dev->chip_info;

View File

@ -33,9 +33,6 @@
/* Forward declarations */ /* Forward declarations */
static void enable_dev(device_t dev); static void enable_dev(device_t dev);
static void sio1036_pnp_set_resources(device_t dev);
static void sio1036_pnp_enable_resources(device_t dev);
static void sio1036_pnp_enable(device_t dev);
static void sio1036_init(device_t dev); static void sio1036_init(device_t dev);
static void pnp_enter_conf_state(device_t dev); static void pnp_enter_conf_state(device_t dev);
@ -53,9 +50,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = sio1036_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = sio1036_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = sio1036_pnp_enable, .enable = pnp_alt_enable,
.init = sio1036_init, .init = sio1036_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };
@ -69,21 +66,6 @@ static void enable_dev(device_t dev)
pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info); pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
} }
static void sio1036_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void sio1036_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void sio1036_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static void sio1036_init(device_t dev) static void sio1036_init(device_t dev)
{ {
struct superio_smsc_sio1036_config *conf = dev->chip_info; struct superio_smsc_sio1036_config *conf = dev->chip_info;

View File

@ -169,29 +169,6 @@ static void smsc_pnp_exit_conf_state(device_t dev)
outb(0xaa, dev->path.pnp.port); outb(0xaa, dev->path.pnp.port);
} }
/** Wrapper for pnp_set_resources(). */
static void smsc_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
/** Wrapper for pnp_enable_resources(). */
static void smsc_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
/**
* If so configured, enable the specified device, otherwise
* explicitly disable it.
*
* @param dev The device to use.
*/
static void smsc_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
/** /**
* Initialize those logical devices which need a special init. * Initialize those logical devices which need a special init.
* *
@ -230,9 +207,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
/** Standard device operations. */ /** Standard device operations. */
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = smsc_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = smsc_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = smsc_pnp_enable, .enable = pnp_alt_enable,
.init = smsc_init, .init = smsc_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -172,11 +172,6 @@ static void vt1211_pnp_set_resources(struct device *dev)
pnp_exit_conf_mode(dev); pnp_exit_conf_mode(dev);
} }
static void vt1211_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = pnp_enter_ext_func_mode, .enter_conf_mode = pnp_enter_ext_func_mode,
.exit_conf_mode = pnp_exit_ext_func_mode, .exit_conf_mode = pnp_exit_ext_func_mode,
@ -186,7 +181,7 @@ struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = vt1211_pnp_set_resources, .set_resources = vt1211_pnp_set_resources,
.enable_resources = vt1211_pnp_enable_resources, .enable_resources = vt1211_pnp_enable_resources,
.enable = vt1211_pnp_enable, .enable = pnp_alt_enable,
.init = vt1211_init, .init = vt1211_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -65,21 +65,6 @@ static void w83627dhg_init(device_t dev)
} }
} }
static void w83627dhg_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void w83627dhg_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void w83627dhg_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = pnp_enter_ext_func_mode, .enter_conf_mode = pnp_enter_ext_func_mode,
.exit_conf_mode = pnp_exit_ext_func_mode, .exit_conf_mode = pnp_exit_ext_func_mode,
@ -87,9 +72,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = w83627dhg_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = w83627dhg_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = w83627dhg_pnp_enable, .enable = pnp_alt_enable,
.init = w83627dhg_init, .init = w83627dhg_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -127,11 +127,6 @@ static void w83627ehg_init(device_t dev)
} }
} }
static void w83627ehg_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void w83627ehg_pnp_enable_resources(device_t dev) static void w83627ehg_pnp_enable_resources(device_t dev)
{ {
pnp_enable_resources(dev); pnp_enable_resources(dev);
@ -146,11 +141,6 @@ static void w83627ehg_pnp_enable_resources(device_t dev)
pnp_exit_conf_mode(dev); pnp_exit_conf_mode(dev);
} }
static void w83627ehg_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = pnp_enter_ext_func_mode, .enter_conf_mode = pnp_enter_ext_func_mode,
.exit_conf_mode = pnp_exit_ext_func_mode, .exit_conf_mode = pnp_exit_ext_func_mode,
@ -158,9 +148,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = w83627ehg_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = w83627ehg_pnp_enable_resources, .enable_resources = w83627ehg_pnp_enable_resources,
.enable = w83627ehg_pnp_enable, .enable = pnp_alt_enable,
.init = w83627ehg_init, .init = w83627ehg_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -134,11 +134,6 @@ static void w83627hf_init(device_t dev)
} }
} }
static void w83627hf_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void w83627hf_pnp_enable_resources(device_t dev) static void w83627hf_pnp_enable_resources(device_t dev)
{ {
pnp_enable_resources(dev); pnp_enable_resources(dev);
@ -153,11 +148,6 @@ static void w83627hf_pnp_enable_resources(device_t dev)
pnp_exit_conf_mode(dev); pnp_exit_conf_mode(dev);
} }
static void w83627hf_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = pnp_enter_ext_func_mode, .enter_conf_mode = pnp_enter_ext_func_mode,
.exit_conf_mode = pnp_exit_ext_func_mode, .exit_conf_mode = pnp_exit_ext_func_mode,
@ -165,9 +155,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = w83627hf_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = w83627hf_pnp_enable_resources, .enable_resources = w83627hf_pnp_enable_resources,
.enable = w83627hf_pnp_enable, .enable = pnp_alt_enable,
.init = w83627hf_init, .init = w83627hf_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -55,21 +55,6 @@ static void w83627thg_init(device_t dev)
} }
} }
static void w83627thg_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void w83627thg_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void w83627thg_enable(device_t dev)
{
pnp_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = w83627thg_enter_ext_func_mode, .enter_conf_mode = w83627thg_enter_ext_func_mode,
.exit_conf_mode = w83627thg_exit_ext_func_mode, .exit_conf_mode = w83627thg_exit_ext_func_mode,
@ -77,9 +62,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = w83627thg_set_resources, .set_resources = pnp_set_resources,
.enable_resources = w83627thg_enable_resources, .enable_resources = pnp_enable_resources,
.enable = w83627thg_enable, .enable = pnp_enable,
.init = w83627thg_init, .init = w83627thg_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -101,21 +101,6 @@ static void w83627uhg_init(device_t dev)
} }
} }
static void w83627uhg_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void w83627uhg_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void w83627uhg_enable(device_t dev)
{
pnp_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = w83627uhg_enter_ext_func_mode, .enter_conf_mode = w83627uhg_enter_ext_func_mode,
.exit_conf_mode = w83627uhg_exit_ext_func_mode, .exit_conf_mode = w83627uhg_exit_ext_func_mode,
@ -123,9 +108,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = w83627uhg_set_resources, .set_resources = pnp_set_resources,
.enable_resources = w83627uhg_enable_resources, .enable_resources = pnp_enable_resources,
.enable = w83627uhg_enable, .enable = pnp_enable,
.init = w83627uhg_init, .init = w83627uhg_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -81,21 +81,6 @@ static void w83697hf_init(device_t dev)
} }
} }
static void w83697hf_pnp_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void w83697hf_pnp_enable(device_t dev)
{
pnp_alt_enable(dev);
}
static void w83697hf_pnp_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = pnp_enter_ext_func_mode, .enter_conf_mode = pnp_enter_ext_func_mode,
.exit_conf_mode = pnp_exit_ext_func_mode, .exit_conf_mode = pnp_exit_ext_func_mode,
@ -103,9 +88,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = w83697hf_pnp_set_resources, .set_resources = pnp_set_resources,
.enable_resources = w83697hf_pnp_enable_resources, .enable_resources = pnp_enable_resources,
.enable = w83697hf_pnp_enable, .enable = pnp_alt_enable,
.init = w83697hf_init, .init = w83697hf_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -54,21 +54,6 @@ static void w83977f_init(device_t dev)
} }
} }
static void w83977f_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void w83977f_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void w83977f_enable(device_t dev)
{
pnp_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = w83977f_enter_ext_func_mode, .enter_conf_mode = w83977f_enter_ext_func_mode,
.exit_conf_mode = w83977f_exit_ext_func_mode, .exit_conf_mode = w83977f_exit_ext_func_mode,
@ -76,9 +61,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = w83977f_set_resources, .set_resources = pnp_set_resources,
.enable_resources = w83977f_enable_resources, .enable_resources = pnp_enable_resources,
.enable = w83977f_enable, .enable = pnp_enable,
.init = w83977f_init, .init = w83977f_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };

View File

@ -56,21 +56,6 @@ static void w83977tf_init(device_t dev)
} }
} }
static void w83977tf_set_resources(device_t dev)
{
pnp_set_resources(dev);
}
static void w83977tf_enable_resources(device_t dev)
{
pnp_enable_resources(dev);
}
static void w83977tf_enable(device_t dev)
{
pnp_enable(dev);
}
static const struct pnp_mode_ops pnp_conf_mode_ops = { static const struct pnp_mode_ops pnp_conf_mode_ops = {
.enter_conf_mode = w83977tf_enter_ext_func_mode, .enter_conf_mode = w83977tf_enter_ext_func_mode,
.exit_conf_mode = w83977tf_exit_ext_func_mode, .exit_conf_mode = w83977tf_exit_ext_func_mode,
@ -78,9 +63,9 @@ static const struct pnp_mode_ops pnp_conf_mode_ops = {
static struct device_operations ops = { static struct device_operations ops = {
.read_resources = pnp_read_resources, .read_resources = pnp_read_resources,
.set_resources = w83977tf_set_resources, .set_resources = pnp_set_resources,
.enable_resources = w83977tf_enable_resources, .enable_resources = pnp_enable_resources,
.enable = w83977tf_enable, .enable = pnp_enable,
.init = w83977tf_init, .init = w83977tf_init,
.ops_pnp_mode = &pnp_conf_mode_ops, .ops_pnp_mode = &pnp_conf_mode_ops,
}; };