Skip to content

Commit 4c170ed

Browse files
committed
Merge branches 'acpi-pnp' and 'pnp'
* acpi-pnp: ACPI / PNP: constify device IDs * pnp: PNP: respect PNP_DRIVER_RES_DO_NOT_CHANGE when detaching PNP: Add Broadwell to Intel MCH size workaround
3 parents 476cc43 + 38a234b + e0f03e8 commit 4c170ed

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

drivers/acpi/acpi_pnp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ static struct acpi_scan_handler acpi_pnp_handler = {
367367
*/
368368
static int is_cmos_rtc_device(struct acpi_device *adev)
369369
{
370-
struct acpi_device_id ids[] = {
370+
static const struct acpi_device_id ids[] = {
371371
{ "PNP0B00" },
372372
{ "PNP0B01" },
373373
{ "PNP0B02" },

drivers/pnp/driver.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ void pnp_device_detach(struct pnp_dev *pnp_dev)
7474
if (pnp_dev->status == PNP_ATTACHED)
7575
pnp_dev->status = PNP_READY;
7676
mutex_unlock(&pnp_lock);
77-
pnp_disable_dev(pnp_dev);
7877
}
7978

8079
static int pnp_device_probe(struct device *dev)
@@ -131,6 +130,11 @@ static int pnp_device_remove(struct device *dev)
131130
drv->remove(pnp_dev);
132131
pnp_dev->driver = NULL;
133132
}
133+
134+
if (pnp_dev->active &&
135+
(!drv || !(drv->flags & PNP_DRIVER_RES_DO_NOT_CHANGE)))
136+
pnp_disable_dev(pnp_dev);
137+
134138
pnp_device_detach(pnp_dev);
135139
return 0;
136140
}

drivers/pnp/quirks.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ static void quirk_amd_mmconfig_area(struct pnp_dev *dev)
343343
static const unsigned int mch_quirk_devices[] = {
344344
0x0154, /* Ivy Bridge */
345345
0x0c00, /* Haswell */
346+
0x1604, /* Broadwell */
346347
};
347348

348349
static struct pci_dev *get_intel_host(void)

0 commit comments

Comments
 (0)