@@ -203,6 +203,7 @@ static const struct acpi_device_id aml_nfw_ids[] = {
static struct acpi_driver acpi_aml_nfw_driver = {
.name = "native firmware",
+ .owner = THIS_MODULE,
.ids = aml_nfw_ids,
.ops = {
.add = aml_nfw_add,
@@ -2071,6 +2071,7 @@ static const struct acpi_device_id hp_ioc_iommu_device_ids[] = {
};
static struct acpi_driver acpi_sba_ioc_driver = {
.name = "IOC IOMMU Driver",
+ .owner = THIS_MODULE,
.ids = hp_ioc_iommu_device_ids,
.ops = {
.add = acpi_sba_ioc_add,
@@ -74,6 +74,7 @@ MODULE_DEVICE_TABLE(acpi, ac_device_ids);
static struct acpi_driver acpi_ac_driver = {
.name = "ac",
.class = ACPI_AC_CLASS,
+ .owner = THIS_MODULE,
.ids = ac_device_ids,
.flags = ACPI_DRIVER_ALL_NOTIFY_EVENTS,
.ops = {
@@ -63,6 +63,7 @@ MODULE_DEVICE_TABLE(acpi, memory_device_ids);
static struct acpi_driver acpi_memory_device_driver = {
.name = "acpi_memhotplug",
.class = ACPI_MEMORY_DEVICE_CLASS,
+ .owner = THIS_MODULE,
.ids = memory_device_ids,
.ops = {
.add = acpi_memory_device_add,
@@ -486,6 +486,7 @@ MODULE_DEVICE_TABLE(acpi, pad_device_ids);
static struct acpi_driver acpi_pad_driver = {
.name = "processor_aggregator",
.class = ACPI_PROCESSOR_AGGREGATOR_CLASS,
+ .owner = THIS_MODULE,
.ids = pad_device_ids,
.ops = {
.add = acpi_pad_add,
@@ -895,6 +895,7 @@ static int acpi_battery_resume(struct acpi_device *device)
static struct acpi_driver acpi_battery_driver = {
.name = "battery",
.class = ACPI_BATTERY_CLASS,
+ .owner = THIS_MODULE,
.ids = battery_device_ids,
.flags = ACPI_DRIVER_ALL_NOTIFY_EVENTS,
.ops = {
@@ -83,6 +83,7 @@ static int acpi_button_state_open_fs(struct inode *inode, struct file *file);
static struct acpi_driver acpi_button_driver = {
.name = "button",
.class = ACPI_BUTTON_CLASS,
+ .owner = THIS_MODULE,
.ids = button_device_ids,
.ops = {
.add = acpi_button_add,
@@ -64,6 +64,7 @@ MODULE_DEVICE_TABLE(acpi, container_device_ids);
static struct acpi_driver acpi_container_driver = {
.name = "container",
.class = ACPI_CONTAINER_CLASS,
+ .owner = THIS_MODULE,
.ids = container_device_ids,
.ops = {
.add = acpi_container_add,
@@ -989,6 +989,7 @@ static int acpi_ec_resume(struct acpi_device *device)
static struct acpi_driver acpi_ec_driver = {
.name = "ec",
.class = ACPI_EC_CLASS,
+ .owner = THIS_MODULE,
.ids = ec_device_ids,
.ops = {
.add = acpi_ec_add,
@@ -60,6 +60,7 @@ MODULE_DEVICE_TABLE(acpi, fan_device_ids);
static struct acpi_driver acpi_fan_driver = {
.name = "fan",
.class = ACPI_FAN_CLASS,
+ .owner = THIS_MODULE,
.ids = fan_device_ids,
.ops = {
.add = acpi_fan_add,
@@ -65,6 +65,7 @@ MODULE_DEVICE_TABLE(acpi, link_device_ids);
static struct acpi_driver acpi_pci_link_driver = {
.name = "pci_link",
.class = ACPI_PCI_LINK_CLASS,
+ .owner = THIS_MODULE,
.ids = link_device_ids,
.ops = {
.add = acpi_pci_link_add,
@@ -55,6 +55,7 @@ MODULE_DEVICE_TABLE(acpi, root_device_ids);
static struct acpi_driver acpi_pci_root_driver = {
.name = "pci_root",
.class = ACPI_PCI_ROOT_CLASS,
+ .owner = THIS_MODULE,
.ids = root_device_ids,
.ops = {
.add = acpi_pci_root_add,
@@ -73,6 +73,7 @@ MODULE_DEVICE_TABLE(acpi, power_device_ids);
static struct acpi_driver acpi_power_driver = {
.name = "power",
.class = ACPI_POWER_CLASS,
+ .owner = THIS_MODULE,
.ids = power_device_ids,
.ops = {
.add = acpi_power_add,
@@ -100,6 +100,7 @@ MODULE_DEVICE_TABLE(acpi, processor_device_ids);
static struct acpi_driver acpi_processor_driver = {
.name = "processor",
.class = ACPI_PROCESSOR_CLASS,
+ .owner = THIS_MODULE,
.ids = processor_device_ids,
.ops = {
.add = acpi_processor_add,
@@ -1001,6 +1001,7 @@ static int acpi_sbs_resume(struct acpi_device *device)
static struct acpi_driver acpi_sbs_driver = {
.name = "sbs",
.class = ACPI_SBS_CLASS,
+ .owner = THIS_MODULE,
.ids = sbs_device_ids,
.ops = {
.add = acpi_sbs_add,
@@ -44,6 +44,7 @@ MODULE_DEVICE_TABLE(acpi, sbs_device_ids);
static struct acpi_driver acpi_smb_hc_driver = {
.name = "smbus_hc",
.class = ACPI_SMB_HC_CLASS,
+ .owner = THIS_MODULE,
.ids = sbs_device_ids,
.ops = {
.add = acpi_smbus_hc_add,
@@ -121,6 +121,7 @@ MODULE_DEVICE_TABLE(acpi, thermal_device_ids);
static struct acpi_driver acpi_thermal_driver = {
.name = "thermal",
.class = ACPI_THERMAL_CLASS,
+ .owner = THIS_MODULE,
.ids = thermal_device_ids,
.ops = {
.add = acpi_thermal_add,
@@ -93,6 +93,7 @@ MODULE_DEVICE_TABLE(acpi, video_device_ids);
static struct acpi_driver acpi_video_bus = {
.name = "video",
.class = ACPI_VIDEO_CLASS,
+ .owner = THIS_MODULE,
.ids = video_device_ids,
.ops = {
.add = acpi_video_bus_add,
@@ -988,6 +988,7 @@ MODULE_DEVICE_TABLE(acpi, hpet_device_ids);
static struct acpi_driver hpet_acpi_driver = {
.name = "hpet",
+ .owner = THIS_MODULE,
.ids = hpet_device_ids,
.ops = {
.add = hpet_acpi_add,
@@ -1152,6 +1152,7 @@ static const struct acpi_device_id sonypi_device_ids[] = {
static struct acpi_driver sonypi_acpi_driver = {
.name = "sonypi",
.class = "hkey",
+ .owner = THIS_MODULE,
.ids = sonypi_device_ids,
.ops = {
.add = sonypi_acpi_add,
@@ -143,6 +143,7 @@ static void atk_free_sensors(struct atk_data *data);
static struct acpi_driver atk_driver = {
.name = ATK_HID,
.class = "hwmon",
+ .owner = THIS_MODULE,
.ids = atk_ids,
.ops = {
.add = atk_add,
@@ -344,6 +344,7 @@ static int lis3lv02d_resume(struct acpi_device *device)
static struct acpi_driver lis3lv02d_driver = {
.name = DRIVER_NAME,
.class = ACPI_MDPS_CLASS,
+ .owner = THIS_MODULE,
.ids = lis3lv02d_device_ids,
.ops = {
.add = lis3lv02d_add,
@@ -145,6 +145,7 @@ MODULE_DEVICE_TABLE(acpi, atlas_device_ids);
static struct acpi_driver atlas_acpi_driver = {
.name = ACPI_ATLAS_NAME,
.class = ACPI_ATLAS_CLASS,
+ .owner = THIS_MODULE,
.ids = atlas_device_ids,
.ops = {
.add = atlas_acpi_button_add,
@@ -232,6 +232,7 @@ static void asus_hotk_notify(struct acpi_device *device, u32 event);
static struct acpi_driver asus_hotk_driver = {
.name = ASUS_HOTK_NAME,
.class = ASUS_HOTK_CLASS,
+ .owner = THIS_MODULE,
.ids = asus_device_ids,
.flags = ACPI_DRIVER_ALL_NOTIFY_EVENTS,
.ops = {
@@ -466,6 +466,7 @@ MODULE_DEVICE_TABLE(acpi, asus_device_ids);
static struct acpi_driver asus_hotk_driver = {
.name = "asus_acpi",
.class = ACPI_HOTK_CLASS,
+ .owner = THIS_MODULE,
.ids = asus_device_ids,
.flags = ACPI_DRIVER_ALL_NOTIFY_EVENTS,
.ops = {
@@ -213,6 +213,7 @@ MODULE_DEVICE_TABLE(acpi, eeepc_device_ids);
static struct acpi_driver eeepc_hotk_driver = {
.name = EEEPC_HOTK_NAME,
.class = EEEPC_HOTK_CLASS,
+ .owner = THIS_MODULE,
.ids = eeepc_device_ids,
.flags = ACPI_DRIVER_ALL_NOTIFY_EVENTS,
.ops = {
@@ -1052,6 +1052,7 @@ static const struct acpi_device_id fujitsu_device_ids[] = {
static struct acpi_driver acpi_fujitsu_driver = {
.name = ACPI_FUJITSU_DRIVER_NAME,
.class = ACPI_FUJITSU_CLASS,
+ .owner = THIS_MODULE,
.ids = fujitsu_device_ids,
.ops = {
.add = acpi_fujitsu_add,
@@ -1068,6 +1069,7 @@ static const struct acpi_device_id fujitsu_hotkey_device_ids[] = {
static struct acpi_driver acpi_fujitsu_hotkey_driver = {
.name = ACPI_FUJITSU_HOTKEY_DRIVER_NAME,
.class = ACPI_FUJITSU_CLASS,
+ .owner = THIS_MODULE,
.ids = fujitsu_hotkey_device_ids,
.ops = {
.add = acpi_fujitsu_hotkey_add,
@@ -211,6 +211,7 @@ static const struct acpi_device_id intel_menlow_memory_ids[] = {
static struct acpi_driver intel_menlow_memory_driver = {
.name = "intel_menlow_thermal_control",
+ .owner = THIS_MODULE,
.ids = intel_menlow_memory_ids,
.ops = {
.add = intel_menlow_memory_add,
@@ -190,6 +190,7 @@ MODULE_DEVICE_TABLE(acpi, pcc_device_ids);
static struct acpi_driver acpi_pcc_driver = {
.name = ACPI_PCC_DRIVER_NAME,
.class = ACPI_PCC_CLASS,
+ .owner = THIS_MODULE,
.ids = pcc_device_ids,
.ops = {
.add = acpi_pcc_hotkey_add,
@@ -1352,6 +1352,7 @@ static const struct acpi_device_id sony_nc_device_ids[] = {
static struct acpi_driver sony_nc_driver = {
.name = SONY_NC_DRIVER_NAME,
.class = SONY_NC_CLASS,
+ .owner = THIS_MODULE,
.ids = sony_nc_device_ids,
.owner = THIS_MODULE,
.ops = {
@@ -2901,6 +2902,7 @@ static const struct acpi_device_id sony_pic_device_ids[] = {
static struct acpi_driver sony_pic_driver = {
.name = SONY_PIC_DRIVER_NAME,
.class = SONY_PIC_CLASS,
+ .owner = THIS_MODULE,
.ids = sony_pic_device_ids,
.owner = THIS_MODULE,
.ops = {
@@ -706,6 +706,7 @@ static int __init register_tpacpi_subdriver(struct ibm_struct *ibm)
}
sprintf(ibm->acpi->driver->name, "%s_%s", TPACPI_NAME, ibm->name);
+ ibm->acpi->driver->owner = THIS_MODULE;
ibm->acpi->driver->ids = ibm->acpi->hid;
ibm->acpi->driver->ops.add = &tpacpi_device_add;
@@ -92,6 +92,7 @@ MODULE_DEVICE_TABLE(acpi, wmi_device_ids);
static struct acpi_driver acpi_wmi_driver = {
.name = "wmi",
.class = ACPI_WMI_CLASS,
+ .owner = THIS_MODULE,
.ids = wmi_device_ids,
.ops = {
.add = acpi_wmi_add,
The owner field provides the link between drivers and modules in sysfs, but no ACPI driver was setting it. After setting the owner field we can see which module provides which driver and vice versa by looking at /sys/bus/acpi/driver/*/module and /sys/module/*/drivers/acpi:*. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> --- arch/ia64/hp/common/aml_nfw.c | 1 + arch/ia64/hp/common/sba_iommu.c | 1 + drivers/acpi/ac.c | 1 + drivers/acpi/acpi_memhotplug.c | 1 + drivers/acpi/acpi_pad.c | 1 + drivers/acpi/battery.c | 1 + drivers/acpi/button.c | 1 + drivers/acpi/container.c | 1 + drivers/acpi/ec.c | 1 + drivers/acpi/fan.c | 1 + drivers/acpi/pci_link.c | 1 + drivers/acpi/pci_root.c | 1 + drivers/acpi/power.c | 1 + drivers/acpi/processor_core.c | 1 + drivers/acpi/sbs.c | 1 + drivers/acpi/sbshc.c | 1 + drivers/acpi/thermal.c | 1 + drivers/acpi/video.c | 1 + drivers/char/hpet.c | 1 + drivers/char/sonypi.c | 1 + drivers/hwmon/asus_atk0110.c | 1 + drivers/hwmon/hp_accel.c | 1 + drivers/input/misc/atlas_btns.c | 1 + drivers/platform/x86/asus-laptop.c | 1 + drivers/platform/x86/asus_acpi.c | 1 + drivers/platform/x86/eeepc-laptop.c | 1 + drivers/platform/x86/fujitsu-laptop.c | 2 ++ drivers/platform/x86/intel_menlow.c | 1 + drivers/platform/x86/panasonic-laptop.c | 1 + drivers/platform/x86/sony-laptop.c | 2 ++ drivers/platform/x86/thinkpad_acpi.c | 1 + drivers/platform/x86/wmi.c | 1 + 32 files changed, 34 insertions(+), 0 deletions(-)