Lines Matching defs:dev
13 bool dev_add_physical_location(struct device *dev)
18 if (!has_acpi_companion(dev))
21 status = acpi_get_physical_device_location(ACPI_HANDLE(dev), &pld);
25 dev->physical_location =
26 kzalloc(sizeof(*dev->physical_location), GFP_KERNEL);
27 if (!dev->physical_location) {
32 dev->physical_location->panel = pld->panel;
33 dev->physical_location->vertical_position = pld->vertical_position;
34 dev->physical_location->horizontal_position = pld->horizontal_position;
35 dev->physical_location->dock = pld->dock;
36 dev->physical_location->lid = pld->lid;
42 static ssize_t panel_show(struct device *dev, struct device_attribute *attr,
47 switch (dev->physical_location->panel) {
73 static ssize_t vertical_position_show(struct device *dev,
78 switch (dev->physical_location->vertical_position) {
95 static ssize_t horizontal_position_show(struct device *dev,
100 switch (dev->physical_location->horizontal_position) {
117 static ssize_t dock_show(struct device *dev, struct device_attribute *attr,
121 dev->physical_location->dock ? "yes" : "no");
125 static ssize_t lid_show(struct device *dev, struct device_attribute *attr,
129 dev->physical_location->lid ? "yes" : "no");