Age | Commit message (Collapse) | Author | Files | Lines |
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
Signed-off-by: Jaroslav Kysela <[email protected]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
Signed-off-by: Josef Sipek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Signed-off-by: David Woodhouse <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
|
|
Signed-off-by: Jörn Engel <[email protected]>
Signed-off-by: Adrian Bunk <[email protected]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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!
|