mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 11:31:31 +00:00
Merge branch 'acpi-misc'
Merge miscellaneous ACPI changes for 6.13-rc1: - Switch several ACPI platform drivers back to using struct platform_driver::remove() (Uwe Kleine-König). - Replace strcpy() with strscpy() in multiple places in the ACPI subsystem (Muhammad Qasim Abdul Majeed, Abdul Rahim). * acpi-misc: ACPI: Switch back to struct platform_driver::remove() ACPI: scan: Use strscpy() instead of strcpy() ACPI: SBSHC: Use strscpy() instead of strcpy() ACPI: SBS: Use strscpy() instead of strcpy() ACPI: power: Use strscpy() instead of strcpy() ACPI: pci_root: Use strscpy() instead of strcpy() ACPI: pci_link: Use strscpy() instead of strcpy() ACPI: event: Use strscpy() instead of strcpy() ACPI: EC: Use strscpy() instead of strcpy() ACPI: APD: Use strscpy() instead of strcpy() ACPI: thermal: Use strscpy() instead of strcpy()
This commit is contained in:
commit
d47a60e487
@ -290,7 +290,7 @@ static void acpi_ac_remove(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver acpi_ac_driver = {
|
||||
.probe = acpi_ac_probe,
|
||||
.remove_new = acpi_ac_remove,
|
||||
.remove = acpi_ac_remove,
|
||||
.driver = {
|
||||
.name = "ac",
|
||||
.acpi_match_table = ac_device_ids,
|
||||
|
@ -86,7 +86,7 @@ static int fch_misc_setup(struct apd_private_data *pdata)
|
||||
if (!clk_data->name)
|
||||
return -ENOMEM;
|
||||
|
||||
strcpy(clk_data->name, obj->string.pointer);
|
||||
strscpy(clk_data->name, obj->string.pointer, obj->string.length);
|
||||
} else {
|
||||
/* Set default name to mclk if entry missing in firmware */
|
||||
clk_data->name = "mclk";
|
||||
|
@ -462,7 +462,7 @@ MODULE_DEVICE_TABLE(acpi, pad_device_ids);
|
||||
|
||||
static struct platform_driver acpi_pad_driver = {
|
||||
.probe = acpi_pad_probe,
|
||||
.remove_new = acpi_pad_remove,
|
||||
.remove = acpi_pad_remove,
|
||||
.driver = {
|
||||
.dev_groups = acpi_pad_groups,
|
||||
.name = "processor_aggregator",
|
||||
|
@ -684,7 +684,7 @@ static struct platform_driver acpi_tad_driver = {
|
||||
.acpi_match_table = acpi_tad_ids,
|
||||
},
|
||||
.probe = acpi_tad_probe,
|
||||
.remove_new = acpi_tad_remove,
|
||||
.remove = acpi_tad_remove,
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, acpi_tad_ids);
|
||||
|
||||
|
@ -880,7 +880,7 @@ static struct platform_device *einj_dev;
|
||||
* triggering a section mismatch warning.
|
||||
*/
|
||||
static struct platform_driver einj_driver __refdata = {
|
||||
.remove_new = __exit_p(einj_remove),
|
||||
.remove = __exit_p(einj_remove),
|
||||
.driver = {
|
||||
.name = "acpi-einj",
|
||||
},
|
||||
|
@ -1605,7 +1605,7 @@ static struct platform_driver ghes_platform_driver = {
|
||||
.name = "GHES",
|
||||
},
|
||||
.probe = ghes_probe,
|
||||
.remove_new = ghes_remove,
|
||||
.remove = ghes_remove,
|
||||
};
|
||||
|
||||
void __init acpi_ghes_init(void)
|
||||
|
@ -88,7 +88,7 @@ static struct platform_driver agdi_driver = {
|
||||
.name = "agdi",
|
||||
},
|
||||
.probe = agdi_probe,
|
||||
.remove_new = agdi_remove,
|
||||
.remove = agdi_remove,
|
||||
};
|
||||
|
||||
void __init acpi_agdi_init(void)
|
||||
|
@ -158,7 +158,7 @@ MODULE_DEVICE_TABLE(acpi, pch_fivr_device_ids);
|
||||
|
||||
static struct platform_driver pch_fivr_driver = {
|
||||
.probe = pch_fivr_add,
|
||||
.remove_new = pch_fivr_remove,
|
||||
.remove = pch_fivr_remove,
|
||||
.driver = {
|
||||
.name = "dptf_pch_fivr",
|
||||
.acpi_match_table = pch_fivr_device_ids,
|
||||
|
@ -242,7 +242,7 @@ MODULE_DEVICE_TABLE(acpi, int3407_device_ids);
|
||||
|
||||
static struct platform_driver dptf_power_driver = {
|
||||
.probe = dptf_power_add,
|
||||
.remove_new = dptf_power_remove,
|
||||
.remove = dptf_power_remove,
|
||||
.driver = {
|
||||
.name = "dptf_power",
|
||||
.acpi_match_table = int3407_device_ids,
|
||||
|
@ -1677,8 +1677,8 @@ static int acpi_ec_add(struct acpi_device *device)
|
||||
struct acpi_ec *ec;
|
||||
int ret;
|
||||
|
||||
strcpy(acpi_device_name(device), ACPI_EC_DEVICE_NAME);
|
||||
strcpy(acpi_device_class(device), ACPI_EC_CLASS);
|
||||
strscpy(acpi_device_name(device), ACPI_EC_DEVICE_NAME);
|
||||
strscpy(acpi_device_class(device), ACPI_EC_CLASS);
|
||||
|
||||
if (boot_ec && (boot_ec->handle == device->handle ||
|
||||
!strcmp(acpi_device_hid(device), ACPI_ECDT_HID))) {
|
||||
|
@ -28,8 +28,8 @@ int acpi_notifier_call_chain(struct acpi_device *dev, u32 type, u32 data)
|
||||
{
|
||||
struct acpi_bus_event event;
|
||||
|
||||
strcpy(event.device_class, dev->pnp.device_class);
|
||||
strcpy(event.bus_id, dev->pnp.bus_id);
|
||||
strscpy(event.device_class, dev->pnp.device_class);
|
||||
strscpy(event.bus_id, dev->pnp.bus_id);
|
||||
event.type = type;
|
||||
event.data = data;
|
||||
return (blocking_notifier_call_chain(&acpi_chain_head, 0, (void *)&event)
|
||||
|
@ -185,7 +185,7 @@ static const struct acpi_device_id ged_acpi_ids[] = {
|
||||
|
||||
static struct platform_driver ged_driver = {
|
||||
.probe = ged_probe,
|
||||
.remove_new = ged_remove,
|
||||
.remove = ged_remove,
|
||||
.shutdown = ged_shutdown,
|
||||
.driver = {
|
||||
.name = MODULE_NAME,
|
||||
|
@ -448,7 +448,7 @@ static const struct dev_pm_ops acpi_fan_pm = {
|
||||
|
||||
static struct platform_driver acpi_fan_driver = {
|
||||
.probe = acpi_fan_probe,
|
||||
.remove_new = acpi_fan_remove,
|
||||
.remove = acpi_fan_remove,
|
||||
.driver = {
|
||||
.name = "acpi-fan",
|
||||
.acpi_match_table = fan_device_ids,
|
||||
|
@ -714,8 +714,8 @@ static int acpi_pci_link_add(struct acpi_device *device,
|
||||
return -ENOMEM;
|
||||
|
||||
link->device = device;
|
||||
strcpy(acpi_device_name(device), ACPI_PCI_LINK_DEVICE_NAME);
|
||||
strcpy(acpi_device_class(device), ACPI_PCI_LINK_CLASS);
|
||||
strscpy(acpi_device_name(device), ACPI_PCI_LINK_DEVICE_NAME);
|
||||
strscpy(acpi_device_class(device), ACPI_PCI_LINK_CLASS);
|
||||
device->driver_data = link;
|
||||
|
||||
mutex_lock(&acpi_link_lock);
|
||||
|
@ -689,8 +689,8 @@ static int acpi_pci_root_add(struct acpi_device *device,
|
||||
|
||||
root->device = device;
|
||||
root->segment = segment & 0xFFFF;
|
||||
strcpy(acpi_device_name(device), ACPI_PCI_ROOT_DEVICE_NAME);
|
||||
strcpy(acpi_device_class(device), ACPI_PCI_ROOT_CLASS);
|
||||
strscpy(acpi_device_name(device), ACPI_PCI_ROOT_DEVICE_NAME);
|
||||
strscpy(acpi_device_class(device), ACPI_PCI_ROOT_CLASS);
|
||||
device->driver_data = root;
|
||||
|
||||
if (hotadd && dmar_device_add(handle)) {
|
||||
|
@ -422,7 +422,7 @@ static struct platform_driver acpi_pfrt_log_driver = {
|
||||
.acpi_match_table = acpi_pfrt_log_ids,
|
||||
},
|
||||
.probe = acpi_pfrt_log_probe,
|
||||
.remove_new = acpi_pfrt_log_remove,
|
||||
.remove = acpi_pfrt_log_remove,
|
||||
};
|
||||
module_platform_driver(acpi_pfrt_log_driver);
|
||||
|
||||
|
@ -565,7 +565,7 @@ static struct platform_driver acpi_pfru_driver = {
|
||||
.acpi_match_table = acpi_pfru_ids,
|
||||
},
|
||||
.probe = acpi_pfru_probe,
|
||||
.remove_new = acpi_pfru_remove,
|
||||
.remove = acpi_pfru_remove,
|
||||
};
|
||||
module_platform_driver(acpi_pfru_driver);
|
||||
|
||||
|
@ -950,8 +950,8 @@ struct acpi_device *acpi_add_power_resource(acpi_handle handle)
|
||||
mutex_init(&resource->resource_lock);
|
||||
INIT_LIST_HEAD(&resource->list_node);
|
||||
INIT_LIST_HEAD(&resource->dependents);
|
||||
strcpy(acpi_device_name(device), ACPI_POWER_DEVICE_NAME);
|
||||
strcpy(acpi_device_class(device), ACPI_POWER_CLASS);
|
||||
strscpy(acpi_device_name(device), ACPI_POWER_DEVICE_NAME);
|
||||
strscpy(acpi_device_class(device), ACPI_POWER_CLASS);
|
||||
device->power.state = ACPI_STATE_UNKNOWN;
|
||||
device->flags.match_driver = true;
|
||||
|
||||
|
@ -644,8 +644,8 @@ static int acpi_sbs_add(struct acpi_device *device)
|
||||
|
||||
sbs->hc = acpi_driver_data(acpi_dev_parent(device));
|
||||
sbs->device = device;
|
||||
strcpy(acpi_device_name(device), ACPI_SBS_DEVICE_NAME);
|
||||
strcpy(acpi_device_class(device), ACPI_SBS_CLASS);
|
||||
strscpy(acpi_device_name(device), ACPI_SBS_DEVICE_NAME);
|
||||
strscpy(acpi_device_class(device), ACPI_SBS_CLASS);
|
||||
device->driver_data = sbs;
|
||||
|
||||
result = acpi_charger_add(sbs);
|
||||
|
@ -252,8 +252,8 @@ static int acpi_smbus_hc_add(struct acpi_device *device)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
strcpy(acpi_device_name(device), ACPI_SMB_HC_DEVICE_NAME);
|
||||
strcpy(acpi_device_class(device), ACPI_SMB_HC_CLASS);
|
||||
strscpy(acpi_device_name(device), ACPI_SMB_HC_DEVICE_NAME);
|
||||
strscpy(acpi_device_class(device), ACPI_SMB_HC_CLASS);
|
||||
|
||||
hc = kzalloc(sizeof(struct acpi_smb_hc), GFP_KERNEL);
|
||||
if (!hc)
|
||||
|
@ -1179,19 +1179,19 @@ static void acpi_device_get_busid(struct acpi_device *device)
|
||||
* TBD: Shouldn't this value be unique (within the ACPI namespace)?
|
||||
*/
|
||||
if (!acpi_dev_parent(device)) {
|
||||
strcpy(device->pnp.bus_id, "ACPI");
|
||||
strscpy(device->pnp.bus_id, "ACPI");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (device->device_type) {
|
||||
case ACPI_BUS_TYPE_POWER_BUTTON:
|
||||
strcpy(device->pnp.bus_id, "PWRF");
|
||||
strscpy(device->pnp.bus_id, "PWRF");
|
||||
break;
|
||||
case ACPI_BUS_TYPE_SLEEP_BUTTON:
|
||||
strcpy(device->pnp.bus_id, "SLPF");
|
||||
strscpy(device->pnp.bus_id, "SLPF");
|
||||
break;
|
||||
case ACPI_BUS_TYPE_ECDT_EC:
|
||||
strcpy(device->pnp.bus_id, "ECDT");
|
||||
strscpy(device->pnp.bus_id, "ECDT");
|
||||
break;
|
||||
default:
|
||||
acpi_get_name(device->handle, ACPI_SINGLE_NAME, &buffer);
|
||||
@ -1202,7 +1202,7 @@ static void acpi_device_get_busid(struct acpi_device *device)
|
||||
else
|
||||
break;
|
||||
}
|
||||
strcpy(device->pnp.bus_id, bus_id);
|
||||
strscpy(device->pnp.bus_id, bus_id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1453,8 +1453,8 @@ static void acpi_set_pnp_ids(acpi_handle handle, struct acpi_device_pnp *pnp,
|
||||
acpi_object_is_system_bus(handle)) {
|
||||
/* \_SB, \_TZ, LNXSYBUS */
|
||||
acpi_add_id(pnp, ACPI_BUS_HID);
|
||||
strcpy(pnp->device_name, ACPI_BUS_DEVICE_NAME);
|
||||
strcpy(pnp->device_class, ACPI_BUS_CLASS);
|
||||
strscpy(pnp->device_name, ACPI_BUS_DEVICE_NAME);
|
||||
strscpy(pnp->device_class, ACPI_BUS_CLASS);
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -796,9 +796,9 @@ static int acpi_thermal_add(struct acpi_device *device)
|
||||
return -ENOMEM;
|
||||
|
||||
tz->device = device;
|
||||
strcpy(tz->name, device->pnp.bus_id);
|
||||
strcpy(acpi_device_name(device), ACPI_THERMAL_DEVICE_NAME);
|
||||
strcpy(acpi_device_class(device), ACPI_THERMAL_CLASS);
|
||||
strscpy(tz->name, device->pnp.bus_id);
|
||||
strscpy(acpi_device_name(device), ACPI_THERMAL_DEVICE_NAME);
|
||||
strscpy(acpi_device_class(device), ACPI_THERMAL_CLASS);
|
||||
device->driver_data = tz;
|
||||
|
||||
acpi_thermal_aml_dependency_fix(tz);
|
||||
|
Loading…
Reference in New Issue
Block a user