]> Git Repo - linux.git/commitdiff
Pull trivial1 into release branch
authorLen Brown <[email protected]>
Thu, 15 Jun 2006 19:37:09 +0000 (15:37 -0400)
committerLen Brown <[email protected]>
Thu, 15 Jun 2006 19:37:09 +0000 (15:37 -0400)
1  2 
drivers/acpi/asus_acpi.c
drivers/acpi/scan.c

diff --combined drivers/acpi/asus_acpi.c
index 216c072dee5e2bdffa71018b97982ad3c9a49ee8,3f3c392d6be88a2543b21039b954403215e7f18c..1a545489e8597b13890a407f923141cc98b1917e
@@@ -817,7 -817,7 +817,7 @@@ typedef int (proc_writefunc) (struct fi
                              unsigned long count, void *data);
  
  static int
__init asus_proc_add(char *name, proc_writefunc * writefunc,
+ asus_proc_add(char *name, proc_writefunc * writefunc,
                     proc_readfunc * readfunc, mode_t mode,
                     struct acpi_device *device)
  {
        return 0;
  }
  
- static int __init asus_hotk_add_fs(struct acpi_device *device)
+ static int asus_hotk_add_fs(struct acpi_device *device)
  {
        struct proc_dir_entry *proc;
        mode_t mode;
@@@ -954,7 -954,7 +954,7 @@@ static void asus_hotk_notify(acpi_handl
   * This function is used to initialize the hotk with right values. In this
   * method, we can make all the detection we want, and modify the hotk struct
   */
- static int __init asus_hotk_get_info(void)
+ static int asus_hotk_get_info(void)
  {
        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
        struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL };
         * HID), this bit will be moved. A global variable asus_info contains
         * the DSDT header.
         */
 -      status = acpi_get_table(ACPI_TABLE_DSDT, 1, &dsdt);
 +      status = acpi_get_table(ACPI_TABLE_ID_DSDT, 1, &dsdt);
        if (ACPI_FAILURE(status))
                printk(KERN_WARNING "  Couldn't get the DSDT table header\n");
        else
        return AE_OK;
  }
  
- static int __init asus_hotk_check(void)
+ static int asus_hotk_check(void)
  {
        int result = 0;
  
        return result;
  }
  
- static int __init asus_hotk_add(struct acpi_device *device)
+ static int asus_hotk_add(struct acpi_device *device)
  {
        acpi_status status = AE_OK;
        int result;
diff --combined drivers/acpi/scan.c
index 95d5bc2acadd3179c73ce8a6e04c84145697ad83,08ba85cab2dd82feca0dcd3e390249e2f375ac88..a5fa85832fa377cc652e260683e813e10a939236
@@@ -234,12 -234,9 +234,9 @@@ static int acpi_bus_get_power_flags(str
  
  int acpi_match_ids(struct acpi_device *device, char *ids)
  {
-       int error = 0;
-       struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
        if (device->flags.hardware_id)
                if (strstr(ids, device->pnp.hardware_id))
-                       goto Done;
+                       return 0;
  
        if (device->flags.compatible_ids) {
                struct acpi_compatible_id_list *cid_list = device->pnp.cid_list;
                /* compare multiple _CID entries against driver ids */
                for (i = 0; i < cid_list->count; i++) {
                        if (strstr(ids, cid_list->id[i].value))
-                               goto Done;
+                               return 0;
                }
        }
-       error = -ENOENT;
-       Done:
-       if (buffer.pointer)
-               acpi_os_free(buffer.pointer);
-       return error;
+       return -ENOENT;
  }
  
  static acpi_status
@@@ -441,7 -433,10 +433,7 @@@ acpi_eject_store(struct acpi_device *de
        islockable = device->flags.lockable;
        handle = device->handle;
  
 -      if (type == ACPI_TYPE_PROCESSOR)
 -              result = acpi_bus_trim(device, 0);
 -      else
 -              result = acpi_bus_trim(device, 1);
 +      result = acpi_bus_trim(device, 1);
  
        if (!result)
                result = acpi_eject_operation(handle, islockable);
@@@ -642,21 -637,19 +634,19 @@@ EXPORT_SYMBOL(acpi_bus_register_driver)
   */
  int acpi_bus_unregister_driver(struct acpi_driver *driver)
  {
-       int error = 0;
        ACPI_FUNCTION_TRACE("acpi_bus_unregister_driver");
  
-       if (driver) {
-               acpi_driver_detach(driver);
+       if (!driver)
+               return_VALUE(-EINVAL);
  
-               if (!atomic_read(&driver->references)) {
-                       spin_lock(&acpi_device_lock);
-                       list_del_init(&driver->node);
-                       spin_unlock(&acpi_device_lock);
-               }
-       } else
-               error = -EINVAL;
-       return_VALUE(error);
+       acpi_driver_detach(driver);
+       if (!atomic_read(&driver->references)) {
+               spin_lock(&acpi_device_lock);
+               list_del_init(&driver->node);
+               spin_unlock(&acpi_device_lock);
+       }
+       return_VALUE(0);
  }
  
  EXPORT_SYMBOL(acpi_bus_unregister_driver);
This page took 0.072473 seconds and 4 git commands to generate.