Lines Matching defs:device
32 static int acpi_memory_device_add(struct acpi_device *device,
34 static void acpi_memory_device_remove(struct acpi_device *device);
55 struct acpi_device *device;
115 status = acpi_walk_resources(mem_device->device->handle, METHOD_NAME__CRS,
129 /* Get device present/absent information from the _STA */
130 if (ACPI_FAILURE(acpi_evaluate_integer(mem_device->device->handle,
135 * Check for device status. Device should be
172 acpi_handle handle = mem_device->device->handle;
191 dev_err(&mem_device->device->dev, "device is empty\n");
226 result = acpi_bind_memory_blocks(info, mem_device->device);
236 * device is bound to this driver.
241 dev_err(&mem_device->device->dev, "add_memory failed\n");
245 * Sometimes the memory device will contain several memory blocks.
249 * memory, it will be failure and the memory device can't be bound with
280 mem_device->device->driver_data = NULL;
284 static int acpi_memory_device_add(struct acpi_device *device,
290 if (!device)
298 mem_device->device = device;
300 sprintf(acpi_device_name(device), "%s", ACPI_MEMORY_DEVICE_NAME);
301 sprintf(acpi_device_class(device), "%s", ACPI_MEMORY_DEVICE_CLASS);
302 device->driver_data = mem_device;
307 device->driver_data = NULL;
320 dev_err(&device->dev, "acpi_memory_enable_device() error\n");
325 dev_dbg(&device->dev, "Memory device configured by ACPI\n");
329 static void acpi_memory_device_remove(struct acpi_device *device)
333 if (!device || !acpi_driver_data(device))
336 mem_device = acpi_driver_data(device);