Lines Matching refs:device

273 static ssize_t acpi_pad_rrtime_store(struct device *dev,  in acpi_pad_rrtime_store()
287 static ssize_t acpi_pad_rrtime_show(struct device *dev, in acpi_pad_rrtime_show()
296 static ssize_t acpi_pad_idlepct_store(struct device *dev, in acpi_pad_idlepct_store()
310 static ssize_t acpi_pad_idlepct_show(struct device *dev, in acpi_pad_idlepct_show()
319 static ssize_t acpi_pad_idlecpus_store(struct device *dev, in acpi_pad_idlecpus_store()
331 static ssize_t acpi_pad_idlecpus_show(struct device *dev, in acpi_pad_idlecpus_show()
342 static int acpi_pad_add_sysfs(struct acpi_device *device) in acpi_pad_add_sysfs() argument
346 result = device_create_file(&device->dev, &dev_attr_idlecpus); in acpi_pad_add_sysfs()
349 result = device_create_file(&device->dev, &dev_attr_idlepct); in acpi_pad_add_sysfs()
351 device_remove_file(&device->dev, &dev_attr_idlecpus); in acpi_pad_add_sysfs()
354 result = device_create_file(&device->dev, &dev_attr_rrtime); in acpi_pad_add_sysfs()
356 device_remove_file(&device->dev, &dev_attr_idlecpus); in acpi_pad_add_sysfs()
357 device_remove_file(&device->dev, &dev_attr_idlepct); in acpi_pad_add_sysfs()
363 static void acpi_pad_remove_sysfs(struct acpi_device *device) in acpi_pad_remove_sysfs() argument
365 device_remove_file(&device->dev, &dev_attr_idlecpus); in acpi_pad_remove_sysfs()
366 device_remove_file(&device->dev, &dev_attr_idlepct); in acpi_pad_remove_sysfs()
367 device_remove_file(&device->dev, &dev_attr_rrtime); in acpi_pad_remove_sysfs()
422 struct acpi_device *device = data; in acpi_pad_notify() local
427 acpi_bus_generate_netlink_event(device->pnp.device_class, in acpi_pad_notify()
428 dev_name(&device->dev), event, 0); in acpi_pad_notify()
436 static int acpi_pad_add(struct acpi_device *device) in acpi_pad_add() argument
440 strcpy(acpi_device_name(device), ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME); in acpi_pad_add()
441 strcpy(acpi_device_class(device), ACPI_PROCESSOR_AGGREGATOR_CLASS); in acpi_pad_add()
443 if (acpi_pad_add_sysfs(device)) in acpi_pad_add()
446 status = acpi_install_notify_handler(device->handle, in acpi_pad_add()
447 ACPI_DEVICE_NOTIFY, acpi_pad_notify, device); in acpi_pad_add()
449 acpi_pad_remove_sysfs(device); in acpi_pad_add()
456 static int acpi_pad_remove(struct acpi_device *device) in acpi_pad_remove() argument
462 acpi_remove_notify_handler(device->handle, in acpi_pad_remove()
464 acpi_pad_remove_sysfs(device); in acpi_pad_remove()