mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
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>
This commit is contained in:
@@ -391,6 +391,7 @@ int pnp_register_port_resource(struct pnp_dev *dev, struct pnp_option *option,
|
||||
int pnp_register_mem_resource(struct pnp_dev *dev, struct pnp_option *option,
|
||||
struct pnp_mem *data);
|
||||
void pnp_init_resource_table(struct pnp_resource_table *table);
|
||||
void pnp_init_resources(struct pnp_dev *dev);
|
||||
int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res,
|
||||
int mode);
|
||||
int pnp_auto_config_dev(struct pnp_dev *dev);
|
||||
@@ -438,6 +439,7 @@ static inline int pnp_register_dma_resource(struct pnp_dev *dev, struct pnp_opti
|
||||
static inline int pnp_register_port_resource(struct pnp_dev *dev, struct pnp_option *option, struct pnp_port *data) { return -ENODEV; }
|
||||
static inline int pnp_register_mem_resource(struct pnp_dev *dev, struct pnp_option *option, struct pnp_mem *data) { return -ENODEV; }
|
||||
static inline void pnp_init_resource_table(struct pnp_resource_table *table) { }
|
||||
static inline void pnp_init_resources(struct pnp_dev *dev) { }
|
||||
static inline int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res, int mode) { return -ENODEV; }
|
||||
static inline int pnp_auto_config_dev(struct pnp_dev *dev) { return -ENODEV; }
|
||||
static inline int pnp_validate_config(struct pnp_dev *dev) { return -ENODEV; }
|
||||
|
Reference in New Issue
Block a user