提交 6ee4bdc2 编写于 作者: X Xiaofei Tan 提交者: Rafael J. Wysocki

ACPI: dock: fix some coding style issues

Fix some coding style issues reported by checkpatch.pl, including
following types:

WARNING: Missing a blank line after declarations
ERROR: spaces required around that ':'
WARNING: Statements should start on a tabstop
Signed-off-by: NXiaofei Tan <tanxiaofei@huawei.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 d0fb66e9
...@@ -271,6 +271,7 @@ static void hotplug_dock_devices(struct dock_station *ds, u32 event) ...@@ -271,6 +271,7 @@ static void hotplug_dock_devices(struct dock_station *ds, u32 event)
if (!acpi_device_enumerated(adev)) { if (!acpi_device_enumerated(adev)) {
int ret = acpi_bus_scan(adev->handle); int ret = acpi_bus_scan(adev->handle);
if (ret) if (ret)
dev_dbg(&adev->dev, "scan error %d\n", -ret); dev_dbg(&adev->dev, "scan error %d\n", -ret);
} }
...@@ -502,6 +503,7 @@ static ssize_t flags_show(struct device *dev, ...@@ -502,6 +503,7 @@ static ssize_t flags_show(struct device *dev,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
{ {
struct dock_station *dock_station = dev->platform_data; struct dock_station *dock_station = dev->platform_data;
return snprintf(buf, PAGE_SIZE, "%d\n", dock_station->flags); return snprintf(buf, PAGE_SIZE, "%d\n", dock_station->flags);
} }
...@@ -523,7 +525,7 @@ static ssize_t undock_store(struct device *dev, struct device_attribute *attr, ...@@ -523,7 +525,7 @@ static ssize_t undock_store(struct device *dev, struct device_attribute *attr,
begin_undock(dock_station); begin_undock(dock_station);
ret = handle_eject_request(dock_station, ACPI_NOTIFY_EJECT_REQUEST); ret = handle_eject_request(dock_station, ACPI_NOTIFY_EJECT_REQUEST);
acpi_scan_lock_release(); acpi_scan_lock_release();
return ret ? ret: count; return ret ? ret : count;
} }
static DEVICE_ATTR_WO(undock); static DEVICE_ATTR_WO(undock);
...@@ -535,10 +537,11 @@ static ssize_t uid_show(struct device *dev, ...@@ -535,10 +537,11 @@ static ssize_t uid_show(struct device *dev,
{ {
unsigned long long lbuf; unsigned long long lbuf;
struct dock_station *dock_station = dev->platform_data; struct dock_station *dock_station = dev->platform_data;
acpi_status status = acpi_evaluate_integer(dock_station->handle, acpi_status status = acpi_evaluate_integer(dock_station->handle,
"_UID", NULL, &lbuf); "_UID", NULL, &lbuf);
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status))
return 0; return 0;
return snprintf(buf, PAGE_SIZE, "%llx\n", lbuf); return snprintf(buf, PAGE_SIZE, "%llx\n", lbuf);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册