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>
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c
index 945c620..c9af87a 100644
--- a/drivers/pnp/manager.c
+++ b/drivers/pnp/manager.c
@@ -272,6 +272,11 @@
}
}
+void pnp_init_resources(struct pnp_dev *dev)
+{
+ pnp_init_resource_table(&dev->res);
+}
+
/**
* pnp_clean_resources - clears resources that were not manually set
* @res: the resources to clean