aboutsummaryrefslogtreecommitdiff
path: root/drivers/pnp/isapnp
AgeCommit message (Collapse)AuthorFilesLines
2008-04-29PNP: remove more pnp_resource_table argumentsBjorn Helgaas1-3/+3
Stop passing around struct pnp_resource_table pointers. In most cases, the caller doesn't need to know how the resources are stored inside the struct pnp_dev. Signed-off-by: Bjorn Helgaas <[email protected]> Acked-By: Rene Herman <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29PNP: remove pnp_resource_table from internal get/set interfacesBjorn Helgaas1-6/+5
When we call protocol->get() and protocol->set() methods, we currently supply pointers to both the pnp_dev and the pnp_resource_table even though the pnp_resource_table should always be the one associated with the pnp_dev. This removes the pnp_resource_table arguments to make it clear that these methods only operate on the specified pnp_dev. Signed-off-by: Bjorn Helgaas <[email protected]> Acked-By: Rene Herman <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29PNP: add debug output to option registrationBjorn Helgaas1-21/+29
Add debug output to resource option registration functions (enabled by CONFIG_PNP_DEBUG). This uses dev_printk, so I had to add pnp_dev arguments at the same time. Signed-off-by: Bjorn Helgaas <[email protected]> Acked-By: Rene Herman <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29PNP: add pnp_alloc_card()Bjorn Helgaas1-8/+5
Add pnp_alloc_card() to allocate a struct pnp_card and fill in the protocol, instance number, and initial PNP ID. Now it is always valid to use dev_printk() on any pnp_card pointer. Signed-off-by: Bjorn Helgaas <[email protected]> Acked-By: Rene Herman <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29ISAPNP: pull pnp_add_card_id() out of isapnp_parse_card_id()Bjorn Helgaas1-22/+6
Split the pnp_add_card_id() part from the PNPID conversion part so we can move the initial add_id() into the pnp_card allocation. This makes the PNPID conversion generic so we can use the same one for both devices and cards. Signed-off-by: Bjorn Helgaas <[email protected]> Acked-By: Rene Herman <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29PNP: change pnp_add_card_id() to allocate its own pnp_id structuresBjorn Helgaas1-10/+11
This moves some of the pnp_id knowledge out of the backends and into the PNP core. Signed-off-by: Bjorn Helgaas <[email protected]> Acked-By: Rene Herman <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29PNP: add pnp_alloc_dev()Bjorn Helgaas1-6/+5
Add pnp_alloc_dev() to allocate a struct pnp_dev and fill in the protocol, instance number, and initial PNP ID. Now it is always valid to use dev_printk() on any pnp_dev pointer. Signed-off-by: Bjorn Helgaas <[email protected]> Acked-By: Rene Herman <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29PNP: add pnp_eisa_id_to_string()Bjorn Helgaas1-21/+11
Converting the EISA ID to a string is messy and error-prone, and we might as well use the same code for ISAPNP and PNPBIOS. PNPACPI uses the conversion done by the ACPI core with acpi_ex_eisa_id_to_string(). Signed-off-by: Bjorn Helgaas <[email protected]> Acked-By: Rene Herman <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29PNP: change pnp_add_id() to allocate its own pnp_id structuresBjorn Helgaas1-8/+6
This moves some of the pnp_id knowledge out of the backends and into the PNP core. Signed-off-by: Bjorn Helgaas <[email protected]> Acked-By: Rene Herman <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29ISAPNP: move config register addresses out of isapnp.hBjorn Helgaas1-0/+8
These are used only in drivers/pnp/isapnp/core.c, so no need to expose them to the world. Signed-off-by: Bjorn Helgaas <[email protected]> Acked-By: Rene Herman <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29PNP: turn on -DDEBUG when CONFIG_PNP_DEBUG is setBjorn Helgaas1-0/+4
Turn on -DDEBUG in CFLAGS when CONFIG_PNP_DEBUG=y. This makes dev_dbg() do what you expect. Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Rene Herman <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-03-22ISAPNP: fix limits of logical device register setBjorn Helgaas1-8/+17
PNP_MAX_MEM and PNP_MAX_PORT are mainly used to size tables of PNP device resources. In 2.6.24, we increased their values to accomodate ACPI devices that have many resources: 2.6.23 2.6.24 ------ ------ PNP_MAX_MEM 4 12 PNP_MAX_PORT 8 40 However, ISAPNP also used these constants as the size of parts of the logical device register set. This register set is fixed by hardware, so increasing the constants meant that we were reading and writing unintended parts of the register set. This patch changes ISAPNP to use the correct register set sizes (the same values we used prior to 2.6.24). Signed-off-by: Bjorn Helgaas <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-10-16[ALSA] Changed Jaroslav Kysela's e-mail from [email protected] to [email protected]Jaroslav Kysela2-3/+3
Signed-off-by: Jaroslav Kysela <[email protected]>
2007-08-24PNP: remove null pointer checksBjorn Helgaas1-1/+1
Remove some null pointer checks. Null pointers in these areas indicate programming errors, and I think it's better to oops immediately rather than return an error that is easily ignored. Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Adam Belay <[email protected]> Signed-off-by: Len Brown <[email protected]>
2007-08-24PNP: remove MODULE infrastructureBjorn Helgaas1-45/+0
We don't support building any part of PNP as a module (*drivers* can be modules, of course, but the PNP infrastructure itself can not). Since MODULE will never be defined, remove the ifdefs and dead code. Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Adam Belay <[email protected]> Signed-off-by: Len Brown <[email protected]>
2007-08-24ISAPNP: removed unused isapnp_detected and ISAPNP_DEBUGBjorn Helgaas1-7/+0
ISAPNP_DEBUG isn't used at all. isapnp_detected is set but never read. So remove them both. Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Adam Belay <[email protected]> Signed-off-by: Len Brown <[email protected]>
2007-08-24PNP: fix up after LindentBjorn Helgaas1-9/+6
More manual fixups after Lindent. No functional change. Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Adam Belay <[email protected]> Signed-off-by: Len Brown <[email protected]>
2007-07-26PNP: fix up after LindentBjorn Helgaas3-40/+20
These are manual fixups after running Lindent. No functional change. Signed-off-by: Bjorn Helgaas <[email protected]> Cc: Len Brown <[email protected]> Cc: Adam Belay <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-07-26PNP: Lindent all source filesBjorn Helgaas3-147/+199
Run Lindent on all PNP source files. Produced by: $ quilt new pnp-lindent $ find drivers/pnp -name \*.[ch] | xargs quilt add $ quilt add include/linux/{pnp.h,pnpbios.h} $ scripts/Lindent drivers/pnp/*.c drivers/pnp/*/*.c include/linux/pnp*.h $ quilt refresh --sort Signed-off-by: Bjorn Helgaas <[email protected]> Cc: Len Brown <[email protected]> Cc: Adam Belay <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-07-16isapnp: remove pointless check of 'type' against 0 in isapnp_read_tag()Jesper Juhl1-2/+0
In drivers/pnp/isapnp/core.c::isapnp_read_tag() there is a test of 'type' being == 0 a bit down in the function. That test doesn't make any sense. If 'type' could indeed be NULL, then the test happens way too late as we'd already have tried to dereference the pointer earlier and looking at the callers it also turns out that there is no way type can ever actually be NULL. So the test is completely pointless and should just be removed. Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-07-16Use menuconfig objects: PNPJan Engelhardt1-1/+1
Use menuconfigs instead of menus, so the whole menu can be disabled at once instead of going through all options. Signed-off-by: Jan Engelhardt <[email protected]> Cc: Adam Belay <[email protected]> Cc: Bjorn Helgaas <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-02-12[PATCH] mark struct file_operations const 5Arjan van de Ven1-1/+1
Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-12-13[PATCH] Fix numerous kcalloc() calls, convert to kzalloc()Robert P. J. Day1-11/+11
All kcalloc() calls of the form "kcalloc(1,...)" are converted to the equivalent kzalloc() calls, and a few kcalloc() calls with the incorrect ordering of the first two arguments are fixed. Signed-off-by: Robert P. J. Day <[email protected]> Cc: Jeff Garzik <[email protected]> Cc: Alan Cox <[email protected]> Cc: Dominik Brodowski <[email protected]> Cc: Adam Belay <[email protected]> Cc: James Bottomley <[email protected]> Cc: Greg KH <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Trond Myklebust <[email protected]> Cc: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-12-08[PATCH] struct path: convert isapnpJosef Sipek1-1/+1
Signed-off-by: Josef Sipek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-10-02[POWERPC] Use check_legacy_ioport() for ISAPnPDavid Woodhouse1-0/+4
Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel3-3/+0
Signed-off-by: Jörn Engel <[email protected]> Signed-off-by: Adrian Bunk <[email protected]>
2006-03-26[PATCH] sem2mutex: misc static one-file mutexesIngo Molnar1-3/+4
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <[email protected]> Cc: Dave Jones <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Neil Brown <[email protected]> Acked-by: Alasdair G Kergon <[email protected]> Cc: Greg KH <[email protected]> Cc: Dominik Brodowski <[email protected]> Cc: Adam Belay <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: "David S. Miller" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-03-25[PATCH] Fix memory leak in isapnpJesper Juhl1-1/+3
Spotted by the Coverity checker as bug #666 akpm; there are several other `return 1;'s in there which aren't freeing `dev'. (A fix which converts this function to single-exit would be preferred..) Signed-off-by: Jesper Juhl <[email protected]> Cc: Adam Belay <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2005-11-07[PATCH] drivers/pnp/: cleanupsAdrian Bunk1-0/+2
This patch contains the following possible cleanups: - make needlessly global code static - #if 0 the following unused global function: - core.c: pnp_remove_device - #if 0 the following unneeded EXPORT_SYMBOL's: - card.c: pnp_add_card - card.c: pnp_remove_card - card.c: pnp_add_card_device - card.c: pnp_remove_card_device - card.c: pnp_add_card_id - core.c: pnp_register_protocol - core.c: pnp_unregister_protocol - core.c: pnp_add_device - core.c: pnp_remove_device - pnpacpi/core.c: pnpacpi_protocol - driver.c: pnp_add_id - isapnp/core.c: isapnp_read_byte - manager.c: pnp_auto_config_dev - resource.c: pnp_register_dependent_option - resource.c: pnp_register_independent_option - resource.c: pnp_register_irq_resource - resource.c: pnp_register_dma_resource - resource.c: pnp_register_port_resource - resource.c: pnp_register_mem_resource Note that this patch #if 0's exactly one functions and removes no functions. Most it does is the #if 0 of EXPORT_SYMBOL's, so if any modular code will use any of them, re-adding will be trivial. Modular ISAPnP might be interesting in some cases, but this is more legacy code. If someone would work on it to sort all the issues out (starting with the point that most users of __ISAPNP__ will have to be fixed) re-enabling the required EXPORT_SYMBOL's won't be hard for him. Signed-off-by: Adrian Bunk <[email protected]> Cc: Adam Belay <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2005-09-07[PATCH] pnp: consolidate kmalloc wrappersBjorn Helgaas1-22/+11
ISAPNP, PNPBIOS, and PNPACPI all had their own kmalloc wrappers that reimplemented kcalloc(). Remove the wrappers and just use kcalloc() directly. Note that this also removes the PNPBIOS error message when the kmalloc fails. Signed-off-by: Bjorn Helgaas <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2005-04-16Linux-2.6.12-rc2Linus Torvalds5-0/+1436
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!