Re: [PATCH v9 06/11] PCI, ACPI, acpiphp: Rename alloc_acpiphp_hp_work() to alloc_acpi_hp_work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jan 20, 2013 at 2:38 PM, Rafael J. Wysocki <rjw@xxxxxxx> wrote:
> On Thursday, January 17, 2013 11:53:17 PM Yinghai Lu wrote:
>> Will need to use it for pci root bridge hotplug support, rename
>> *acpiphp* to *acpi* and move to osc.c.
>> Also make kacpi_hotplug_wq static after that.
>>
>> Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
>> Cc: Len Brown <lenb@xxxxxxxxxx>
>> Cc: linux-acpi@xxxxxxxxxxxxxxx
>> ---
>>  drivers/acpi/osl.c                 |   24 +++++++++++++++++++--
>>  drivers/pci/hotplug/acpiphp_glue.c |   42 ++++++------------------------------
>>  include/acpi/acpiosxf.h            |    9 +++++++-
>>  3 files changed, 36 insertions(+), 39 deletions(-)
>>
>> diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
>> index 3ff2678..afcce46 100644
>> --- a/drivers/acpi/osl.c
>> +++ b/drivers/acpi/osl.c
>> @@ -84,8 +84,7 @@ static acpi_osd_handler acpi_irq_handler;
>>  static void *acpi_irq_context;
>>  static struct workqueue_struct *kacpid_wq;
>>  static struct workqueue_struct *kacpi_notify_wq;
>> -struct workqueue_struct *kacpi_hotplug_wq;
>> -EXPORT_SYMBOL(kacpi_hotplug_wq);
>> +static struct workqueue_struct *kacpi_hotplug_wq;
>>
>>  /*
>>   * This list of permanent mappings is for memory that may be accessed from
>> @@ -1778,3 +1777,24 @@ void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state,
>>  {
>>       __acpi_os_prepare_sleep = func;
>>  }
>> +
>> +void alloc_acpi_hp_work(acpi_handle handle, u32 type, void *context,
>> +                     void (*func)(struct work_struct *work))
>> +{
>> +     struct acpi_hp_work *hp_work;
>> +     int ret;
>> +
>> +     hp_work = kmalloc(sizeof(*hp_work), GFP_KERNEL);
>> +     if (!hp_work)
>> +             return;
>> +
>> +     hp_work->handle = handle;
>> +     hp_work->type = type;
>> +     hp_work->context = context;
>> +
>> +     INIT_WORK(&hp_work->work, func);
>> +     ret = queue_work(kacpi_hotplug_wq, &hp_work->work);
>> +     if (!ret)
>> +             kfree(hp_work);
>> +}
>> +EXPORT_SYMBOL(alloc_acpi_hp_work);
>
> That should be EXPORT_SYMBOL_GPL().

Ok.

Chose that because kacpi_hotplug_wq does not have _GPL.

>
...
>> diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
>> index 4315274..adab63c 100644
>> --- a/include/acpi/acpiosxf.h
>> +++ b/include/acpi/acpiosxf.h
>> @@ -193,7 +193,14 @@ void acpi_os_fixed_event_count(u32 fixed_event_number);
>>  /*
>>   * Threads and Scheduling
>>   */
>> -extern struct workqueue_struct *kacpi_hotplug_wq;
>
> include/acpi/acpiosxf.h is related to ACPICA, so while removing kacpi_hotplug_wq
> from it should be OK, please put the rest into acpi_bus.h, preferably next to the
> definition of acpi_eject_event.
>

Ok.

Thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux