10 Oct, 2007
1 commit
-
Three main sets of changes:
1) dmi_get_system_info() return value should have been marked const,
since callers should not be changing that data.2) const-ify DMI internals, since DMI firmware tables should,
whenever possible, be marked const to ensure we never ever write to
that data area.3) const-ify DMI API, to enable marking tables const where possible
in low-level drivers.And if we're really lucky, this might enable some additional
optimizations on the part of the compiler.The bulk of the changes are #2 and #3, which are interrelated. #1 could
have been a separate patch, but it was so small compared to the others,
it was easier to roll it into this changeset.Signed-off-by: Jeff Garzik
12 Sep, 2007
1 commit
-
If the quirk enables the SIR part of the SMCf010 device, the 8250 driver
may claim it as a legacy ttyS device, which makes the legacy probe in the
smsc-ircc2 driver fail.Signed-off-by: Bjorn Helgaas
Cc: Andrey Borzenkov
Cc: Michal Piotrowski
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
24 Aug, 2007
6 commits
-
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
Acked-by: Adam Belay
Signed-off-by: Len Brown -
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
Acked-by: Adam Belay
Signed-off-by: Len Brown -
ISAPNP_DEBUG isn't used at all. isapnp_detected is set but never read.
So remove them both.Signed-off-by: Bjorn Helgaas
Acked-by: Adam Belay
Signed-off-by: Len Brown -
Remove unnecessary casts of void pointers.
Signed-off-by: Bjorn Helgaas
Acked-by: Adam Belay
Signed-off-by: Len Brown -
No need for a temporary variable; just return the flags once we know them.
Signed-off-by: Bjorn Helgaas
Acked-by: Adam Belay
Signed-off-by: Len Brown -
More manual fixups after Lindent. No functional change.
Signed-off-by: Bjorn Helgaas
Acked-by: Adam Belay
Signed-off-by: Len Brown
30 Jul, 2007
1 commit
-
Restore the 2.6.22 CONFIG_ACPI_SLEEP build option, but now shadowing the
new CONFIG_PM_SLEEP option.Signed-off-by: Len Brown
[ Modified to work with the PM config setup changes. ]
Signed-off-by: Linus Torvalds
27 Jul, 2007
2 commits
-
These are manual fixups after running Lindent. No functional change.
Signed-off-by: Bjorn Helgaas
Cc: Len Brown
Cc: Adam Belay
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
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 --sortSigned-off-by: Bjorn Helgaas
Cc: Len Brown
Cc: Adam Belay
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 Jul, 2007
1 commit
24 Jul, 2007
1 commit
-
Modify modpost (file2alias.c) to add acpi*:XYZ0001: alias in modules.alias
like:
grep acpi /lib/modules/2.6.22-rc4-default/modules.alias
alias acpi*:SNY5001:* sony_laptop
alias acpi*:SNY6001:* sony_laptop
for e.g. the sony_laptop module.
This module matches against all ACPI devices with a HID or CID of SNY5001
or SNY6001Export an uevent and modalias sysfs file containing the string:
[MODALIAS=]acpi:PNP0C0C:
additional CIDs are concatenated at the end.Signed-off-by: Thomas Renninger
Signed-off-by: Kay Sievers
Signed-off-by: Len Brown
22 Jul, 2007
1 commit
-
applied after Rafel's 'PM: Update global suspend and hibernation operations framework' patch set
Signed-off-by: Shaohua Li
Signed-off-by: Len Brown
20 Jul, 2007
1 commit
-
Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).
Here is a short excerpt of the semantic patch performing
this transformation:@@
type T2;
expression x;
identifier f,fld;
expression E;
expression E1,E2;
expression e1,e2,e3,y;
statement S;
@@x =
- kmalloc
+ kzalloc
(E1,E2)
... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
- memset((T2)x,0,E1);@@
expression E1,E2,E3;
@@- kzalloc(E1 * E2,E3)
+ kcalloc(E1,E2,E3)[akpm@linux-foundation.org: get kcalloc args the right way around]
Signed-off-by: Yoann Padioleau
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Acked-by: Russell King
Cc: Bryan Wu
Acked-by: Jiri Slaby
Cc: Dave Airlie
Acked-by: Roland Dreier
Cc: Jiri Kosina
Acked-by: Dmitry Torokhov
Cc: Benjamin Herrenschmidt
Acked-by: Mauro Carvalho Chehab
Acked-by: Pierre Ossman
Cc: Jeff Garzik
Cc: "David S. Miller"
Acked-by: Greg KH
Cc: James Bottomley
Cc: "Antonino A. Daplas"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
18 Jul, 2007
2 commits
-
Rather than using a tri-state integer for the wait flag in
call_usermodehelper_exec, define a proper enum, and use that. I've
preserved the integer values so that any callers I've missed should
still work OK.Signed-off-by: Jeremy Fitzhardinge
Cc: James Bottomley
Cc: Randy Dunlap
Cc: Christoph Hellwig
Cc: Andi Kleen
Cc: Paul Mackerras
Cc: Johannes Berg
Cc: Ralf Baechle
Cc: Bjorn Helgaas
Cc: Joel Becker
Cc: Tony Luck
Cc: Kay Sievers
Cc: Srivatsa Vaddagiri
Cc: Oleg Nesterov
Cc: David Howells -
Currently, the freezer treats all tasks as freezable, except for the kernel
threads that explicitly set the PF_NOFREEZE flag for themselves. This
approach is problematic, since it requires every kernel thread to either
set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't
care for the freezing of tasks at all.It seems better to only require the kernel threads that want to or need to
be frozen to use some freezer-related code and to remove any
freezer-related code from the other (nonfreezable) kernel threads, which is
done in this patch.The patch causes all kernel threads to be nonfreezable by default (ie. to
have PF_NOFREEZE set by default) and introduces the set_freezable()
function that should be called by the freezable kernel threads in order to
unset PF_NOFREEZE. It also makes all of the currently freezable kernel
threads call set_freezable(), so it shouldn't cause any (intentional)
change of behaviour to appear. Additionally, it updates documentation to
describe the freezing of tasks more accurately.[akpm@linux-foundation.org: build fixes]
Signed-off-by: Rafael J. Wysocki
Acked-by: Nigel Cunningham
Cc: Pavel Machek
Cc: Oleg Nesterov
Cc: Gautham R Shenoy
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Jul, 2007
2 commits
-
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
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
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
Cc: Adam Belay
Cc: Bjorn Helgaas
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 Jul, 2007
1 commit
-
When we enable the SMCf010 IR device, the Toshiba Portege 4000 BIOS claims
the device is working, but it really isn't configured correctly. The BIOS
*will* configure it, but only if we call _SRS after (1) reversing the order
of the SIR and FIR I/O port regions and (2) changing the IRQ from
active-high to active-low.This patch addresses the 2.6.22 regression:
"no irda0 interface (2.6.21 was OK), smsc does not find chip"I tested this on a Portege 4000. The smsc-ircc2 driver correctly detects
the device, and "irattach irda0 -s && irdadump" shows transmitted and
received packets.Signed-off-by: Bjorn Helgaas
Cc: Andrey Borzenkov
Cc: Samuel Ortiz
Cc: "Linus Walleij (LD/EAB)"
Cc: Michal Piotrowski
Cc: Adam Belay
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
29 Jun, 2007
1 commit
-
Some HP firmware leaves the SMCf010 IRDA device incompletely configured, or
reports the wrong resources in _CRS. As a workaround, when we find such a
device, try to auto-configure the device.This ignores the _CRS data, picks a config from _PRS, and runs _SRS to
configure the device. This makes smsc-ircc2 work correctly with PNP
resources (with no preconfiguration!) on all the machines I tested.I think Windows does something like this by default for all devices,
so we should consider doing the same thing in Linux.This patch addresses part of the 2.6.22 regression:
"no irda0 interface (2.6.21 was OK), smsc does not find chip"
It fixes smsc-ircc2 PNP device detection on HP nc6000, nc6220, nw8000,
nw8240, and possibly other machines.Signed-off-by: Bjorn Helgaas
Cc: Samuel Ortiz
Cc: "Linus Walleij (LD/EAB)"
Cc: Andrey Borzenkov
Cc: Michal Piotrowski
Cc: Adam Belay
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
10 May, 2007
1 commit
-
Add "depends on HAS_IOMEM" to a number of menus to make them
disappear for s390 which does not have I/O memory.Signed-off-by: Martin Schwidefsky
09 May, 2007
5 commits
-
Some HP/Compaq firmware reports via ACPI that the SMCF010 IR device is
enabled, but in fact, it leaves the device partly disabled.HP nw8240 BIOS 68DTV Ver. F.0F, released 9/15/2005 is one BIOS that has this
problem.Signed-off-by: Bjorn Helgaas
Cc: Keith Owens
Cc: Len Brown
Cc: Adam Belay
Cc: Matthieu CASTET
Cc: Jean Tourrilhes
Cc: Matthew Garrett
Cc: Ville Syrjala
Cc: Russell King
Cc: Samuel Ortiz
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This series converts i386 and x86_64 legacy serial ports to be platform
devices and prevents probing for them if we have PNP.This prevents double discovery, where a device was found both by the legacy
probe and by 8250_pnp.This also prevents the serial driver from claiming IRDA devices (unless they
have a UART PNP ID). The serial legacy probe sometimes assumed the wrong IRQ,
so the user had to use "setserial" to fix it.Removing the need for setserial to make IRDA devices work seems good, but it
does break some things. In particular, you may need to keep setserial from
poking legacy UART stuff back in by doing something like "dpkg-reconfigure
setserial" with the "kernel" option. Otherwise, the setserial-discovered
"UART" will claim resources and prevent the IRDA driver from loading.This patch:
If we can discover devices using PNP, we can skip some legacy probes. This
flag ("pnp_platform_devices") indicates that PNPBIOS or PNPACPI is enabled and
should tell us about builtin devices.Signed-off-by: Bjorn Helgaas
Cc: Keith Owens
Cc: Len Brown
Cc: Adam Belay
Cc: Matthieu CASTET
Cc: Jean Tourrilhes
Cc: Matthew Garrett
Cc: Ville Syrjala
Cc: Russell King
Cc: Samuel Ortiz
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patches modifies the pnpbios kernel thread to start with ktrhead_run
not kernel_thread and deamonize. Doing this makes the code a little
simpler and easier to maintain.Signed-off-by: Eric W. Biederman
Cc: Adam Belay
Cc: Bjorn Helgaas
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Teach PNPACPI how to hook up its devices to their ACPI nodes, so that
pnpdev->dev.archdata points to the parallel acpi device node. Previously
this only worked for PCI, leaving a notable hole.Export "acpi_bus_type" so this can work.
Remove some extraneous whitespace.
Signed-off-by: David Brownell
Cc: Adam Belay
Cc: Bjorn Helgaas
Cc: Len Brown
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
PNP now initializes device dma masks, which prevents oopses when generic
dma calls are made using pnp device nodes.This assumes PNP only uses ISA DMA, with 24 bit addresses; and that it's
safe to init those masks for all devices (rather than finding out which
devices have been assigned DMA channels, and handling only those).Signed-off-by: David Brownell
Cc: Adam Belay
Cc: Jaroslav Kysela
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
28 Apr, 2007
1 commit
-
The rwsem is not used to protect anything, so the use of it by the PNP
subsystem isn't really useful, and it's doubtful if it really did anything or
not. So I've removed it.Cc: Adam Belay
Signed-off-by: Greg Kroah-Hartman
03 Apr, 2007
1 commit
-
Change PnP resource handling code to use proper type for resource start and
length. Fixes bogus regions reported in /proc/iomem.I've also made some pointer constant, as they are constant...
Signed-off-by: Petr Vandrovec
Cc: Bjorn Helgaas
Cc: Adam Belay
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Mar, 2007
1 commit
-
Make some normal code paths in PNP stop issuing syslog spam. Since PNP
issues calls regardless of device capablities, it's no surprise when some
of those devices don't support those calls!Signed-off-by: David Brownell
Cc: Adam Belay
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 Mar, 2007
1 commit
-
The PNPACPI resource flags were broken.
This would apply to re-enabling a device any-time after boot,
not just after resume from S3.http://bugzilla.kernel.org/show_bug.cgi?id=6316
Acked-by: Shaohua Li
Signed-off-by: Len Brown
17 Feb, 2007
1 commit
-
Conflicts:
drivers/usb/misc/appledisplay.c
Signed-off-by: Len Brown
16 Feb, 2007
1 commit
-
We removed the ACPI motherboard driver which handled
the ACPI=y, PNP=n case, so now we need to enforce that
PNP & PNPACPI are always enabled for ACPI kernels.Most major distros ship this way this already.
Cc: Bjorn Helgaas
Signed-off-by: Len Brown
13 Feb, 2007
1 commit
-
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
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Feb, 2007
2 commits
-
Delete the few remaining unnecessary calls to memset(0) after a call to
kzalloc().Signed-off-by: Robert P. J. Day
Cc: Andi Kleen
Cc: Dmitry Torokhov
Cc: Adam Belay
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The PNP framework doesn't export "pnp_bus_type", which is an unfortunate
exception to the policy followed by pretty much every other bus. I noticed
this when I had to find a device in order to provide its platform_data.Note that per advice from Arjan, the "export" scope has been been minimized to
avoid the hundred-plus bytes needed to support access from modules. In this
case, the symbol is only needed by statically linked kernel code that lives
outside the drivers/pnp directory.Signed-off-by: David Brownell
Cc: Adam Belay
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Jan, 2007
3 commits
-
PNPACPI is pretty widely used and seems fairly stable, so remove the
dependency on EXPERIMENTAL.Signed-off-by: Bjorn Helgaas
Cc: Adam Belay
Signed-off-by: Andrew Morton
Signed-off-by: Len Brown -
No functional change.
Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown -
Most x86 boxes have no iomem system board resources, but some ia64
boxes do.Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown
14 Dec, 2006
1 commit
-
Run this:
#!/bin/sh
for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
echo "De-casting $f..."
perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
doneAnd then go through and reinstate those cases where code is casting pointers
to non-pointers.And then drop a few hunks which conflicted with outstanding work.
Cc: Russell King , Ian Molton
Cc: Mikael Starvik
Cc: Yoshinori Sato
Cc: Roman Zippel
Cc: Geert Uytterhoeven
Cc: Ralf Baechle
Cc: Paul Mackerras
Cc: Kyle McMartin
Cc: Benjamin Herrenschmidt
Cc: Martin Schwidefsky
Cc: "David S. Miller"
Cc: Jeff Dike
Cc: Greg KH
Cc: Jens Axboe
Cc: Paul Fulghum
Cc: Alan Cox
Cc: Karsten Keil
Cc: Mauro Carvalho Chehab
Cc: Jeff Garzik
Cc: James Bottomley
Cc: Ian Kent
Cc: Steven French
Cc: David Woodhouse
Cc: Neil Brown
Cc: Jaroslav Kysela
Cc: Takashi Iwai
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds