Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branches 'acpi-ec', 'acpi-apei' and 'pnp'

Merge ACPI EC driver fixes, an ACPI APEI fix and PNP fixes for
6.10-rc3:

- Fix error handling during EC operation region accesses in the ACPI EC
driver (Armin Wolf).

- Fix a memory leak in the APEI error injection driver introduced
during its converion to a platform driver (Dan Williams).

- Fix build failures related to the dev_is_pnp() macro by redefining it
as a proper function and exporting it to modules as appropriate and
unexport pnp_bus_type which need not be exported any more (Andy
Shevchenko).

* acpi-ec:
ACPI: EC: Avoid returning AE_OK on errors in address space handler
ACPI: EC: Abort address space access upon error

* acpi-apei:
ACPI: APEI: EINJ: Fix einj_dev release leak

* pnp:
PNP: Hide pnp_bus_type from the non-PNP code
PNP: Make dev_is_pnp() to be a function and export it for modules

+17 -7
+1 -1
drivers/acpi/apei/einj-core.c
··· 909 909 if (einj_initialized) 910 910 platform_driver_unregister(&einj_driver); 911 911 912 - platform_device_del(einj_dev); 912 + platform_device_unregister(einj_dev); 913 913 } 914 914 915 915 module_init(einj_init);
+7 -2
drivers/acpi/ec.c
··· 1333 1333 if (ec->busy_polling || bits > 8) 1334 1334 acpi_ec_burst_enable(ec); 1335 1335 1336 - for (i = 0; i < bytes; ++i, ++address, ++value) 1336 + for (i = 0; i < bytes; ++i, ++address, ++value) { 1337 1337 result = (function == ACPI_READ) ? 1338 1338 acpi_ec_read(ec, address, value) : 1339 1339 acpi_ec_write(ec, address, *value); 1340 + if (result < 0) 1341 + break; 1342 + } 1340 1343 1341 1344 if (ec->busy_polling || bits > 8) 1342 1345 acpi_ec_burst_disable(ec); ··· 1351 1348 return AE_NOT_FOUND; 1352 1349 case -ETIME: 1353 1350 return AE_TIME; 1354 - default: 1351 + case 0: 1355 1352 return AE_OK; 1353 + default: 1354 + return AE_ERROR; 1356 1355 } 1357 1356 } 1358 1357
+1
drivers/pnp/base.h
··· 6 6 7 7 extern struct mutex pnp_lock; 8 8 extern const struct attribute_group *pnp_dev_groups[]; 9 + extern const struct bus_type pnp_bus_type; 9 10 10 11 int pnp_register_protocol(struct pnp_protocol *protocol); 11 12 void pnp_unregister_protocol(struct pnp_protocol *protocol);
+6
drivers/pnp/driver.c
··· 266 266 .dev_groups = pnp_dev_groups, 267 267 }; 268 268 269 + bool dev_is_pnp(const struct device *dev) 270 + { 271 + return dev->bus == &pnp_bus_type; 272 + } 273 + EXPORT_SYMBOL_GPL(dev_is_pnp); 274 + 269 275 int pnp_register_driver(struct pnp_driver *drv) 270 276 { 271 277 drv->driver.name = drv->name;
+2 -4
include/linux/pnp.h
··· 435 435 #define protocol_for_each_dev(protocol, dev) \ 436 436 list_for_each_entry(dev, &(protocol)->devices, protocol_list) 437 437 438 - extern const struct bus_type pnp_bus_type; 439 - 440 438 #if defined(CONFIG_PNP) 441 439 442 440 /* device management */ ··· 467 469 int pnp_register_driver(struct pnp_driver *drv); 468 470 void pnp_unregister_driver(struct pnp_driver *drv); 469 471 470 - #define dev_is_pnp(d) ((d)->bus == &pnp_bus_type) 472 + bool dev_is_pnp(const struct device *dev); 471 473 472 474 #else 473 475 ··· 500 502 static inline int pnp_register_driver(struct pnp_driver *drv) { return -ENODEV; } 501 503 static inline void pnp_unregister_driver(struct pnp_driver *drv) { } 502 504 503 - #define dev_is_pnp(d) false 505 + static inline bool dev_is_pnp(const struct device *dev) { return false; } 504 506 505 507 #endif /* CONFIG_PNP */ 506 508