glue.c (bdf242eeb0f69567fe43eba93889d80ecacbfe94) | glue.c (4be44fcd3bf648b782f4460fd06dfae6c42ded4b) |
---|---|
1/* 2 * Link physical devices with ACPI devices support 3 * 4 * Copyright (c) 2005 David Shaohua Li <shaohua.li@intel.com> 5 * Copyright (c) 2005 Intel Corp. 6 * 7 * This file is released under the GPLv2. 8 */ --- 15 unchanged lines hidden (view full) --- 24int register_acpi_bus_type(struct acpi_bus_type *type) 25{ 26 if (acpi_disabled) 27 return -ENODEV; 28 if (type && type->bus && type->find_device) { 29 down_write(&bus_type_sem); 30 list_add_tail(&type->list, &bus_type_list); 31 up_write(&bus_type_sem); | 1/* 2 * Link physical devices with ACPI devices support 3 * 4 * Copyright (c) 2005 David Shaohua Li <shaohua.li@intel.com> 5 * Copyright (c) 2005 Intel Corp. 6 * 7 * This file is released under the GPLv2. 8 */ --- 15 unchanged lines hidden (view full) --- 24int register_acpi_bus_type(struct acpi_bus_type *type) 25{ 26 if (acpi_disabled) 27 return -ENODEV; 28 if (type && type->bus && type->find_device) { 29 down_write(&bus_type_sem); 30 list_add_tail(&type->list, &bus_type_list); 31 up_write(&bus_type_sem); |
32 printk(KERN_INFO PREFIX "bus type %s registered\n", type->bus->name); | 32 printk(KERN_INFO PREFIX "bus type %s registered\n", 33 type->bus->name); |
33 return 0; 34 } 35 return -ENODEV; 36} 37 38EXPORT_SYMBOL(register_acpi_bus_type); 39 40int unregister_acpi_bus_type(struct acpi_bus_type *type) 41{ 42 if (acpi_disabled) 43 return 0; 44 if (type) { 45 down_write(&bus_type_sem); 46 list_del_init(&type->list); 47 up_write(&bus_type_sem); | 34 return 0; 35 } 36 return -ENODEV; 37} 38 39EXPORT_SYMBOL(register_acpi_bus_type); 40 41int unregister_acpi_bus_type(struct acpi_bus_type *type) 42{ 43 if (acpi_disabled) 44 return 0; 45 if (type) { 46 down_write(&bus_type_sem); 47 list_del_init(&type->list); 48 up_write(&bus_type_sem); |
48 printk(KERN_INFO PREFIX "ACPI bus type %s unregistered\n", type->bus->name); | 49 printk(KERN_INFO PREFIX "ACPI bus type %s unregistered\n", 50 type->bus->name); |
49 return 0; 50 } 51 return -ENODEV; 52} 53 54EXPORT_SYMBOL(unregister_acpi_bus_type); 55 56static struct acpi_bus_type *acpi_get_bus_type(struct bus_type *type) --- 304 unchanged lines hidden --- | 51 return 0; 52 } 53 return -ENODEV; 54} 55 56EXPORT_SYMBOL(unregister_acpi_bus_type); 57 58static struct acpi_bus_type *acpi_get_bus_type(struct bus_type *type) --- 304 unchanged lines hidden --- |