PNP: Handle IORESOURCE_BITS in resource allocation
authorWitold Szczeponik <Witold.Szczeponik@gmx.net>
Sat, 15 Dec 2012 00:02:08 +0000 (01:02 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 3 Jan 2013 12:10:53 +0000 (13:10 +0100)
The patch copies the flags masked by IORESOURCE_BITS from a resource's
template.  This is necessary because the resource settings require proper
IORESOURCE_BITS which are not known during the definition of these resources
using the "/sys/bus/pnp/*/*/resources" interface.  (In fact, they should not
be set by the user as the resource templates define the proper settings.)

If the patch is not applied, the resource flags are not initialized properly
and obscure messages in the kernel log have been seen ("invalid flags").

Signed-off-by: Witold Szczeponik <Witold.Szczeponik@gmx.net>
Reviewed-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

No differences found