Commit bc033c9b authored by Rene Herman's avatar Rene Herman Committed by Linus Torvalds

pnp: add pnp_build_option() to the API

The subsequent AD181x quirk patch would like this as part of the API.
pnp_register_dependent_option() adds to the same dependent chain the quirk is
walking which is fairly unclean.  This enables a private option chain build
which it can then just add onto the end when done.
Signed-off-by: default avatarRene Herman <rene.herman@gmail.com>
Tested-by: default avatarUwe Bugla <uwe.bugla@gmx.de>
Acked-by: default avatarUwe Bugla <uwe.bugla@gmx.de>
Acked-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Len Brown <len.brown@intel.com
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 726a7a3d
...@@ -19,6 +19,7 @@ void pnp_remove_card(struct pnp_card *card); ...@@ -19,6 +19,7 @@ void pnp_remove_card(struct pnp_card *card);
int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev); int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev);
void pnp_remove_card_device(struct pnp_dev *dev); void pnp_remove_card_device(struct pnp_dev *dev);
struct pnp_option *pnp_build_option(int priority);
struct pnp_option *pnp_register_independent_option(struct pnp_dev *dev); struct pnp_option *pnp_register_independent_option(struct pnp_dev *dev);
struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev, struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev,
int priority); int priority);
......
...@@ -28,7 +28,7 @@ static int pnp_reserve_mem[16] = {[0 ... 15] = -1 }; /* reserve (don't use) some ...@@ -28,7 +28,7 @@ static int pnp_reserve_mem[16] = {[0 ... 15] = -1 }; /* reserve (don't use) some
* option registration * option registration
*/ */
static struct pnp_option *pnp_build_option(int priority) struct pnp_option *pnp_build_option(int priority)
{ {
struct pnp_option *option = pnp_alloc(sizeof(struct pnp_option)); struct pnp_option *option = pnp_alloc(sizeof(struct pnp_option));
......
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