hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/platform/x86/intel_oaktrail.c
....@@ -1,5 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0+
12 /*
2
- * intel_oaktrail.c - Intel OakTrail Platform support.
3
+ * Intel OakTrail Platform support
34 *
45 * Copyright (C) 2010-2011 Intel Corporation
56 * Author: Yin Kangkai (kangkai.yin@intel.com)
....@@ -7,21 +8,6 @@
78 * based on Compal driver, Copyright (C) 2008 Cezary Jackiewicz
89 * <cezary.jackiewicz (at) gmail.com>, based on MSI driver
910 * Copyright (C) 2006 Lennart Poettering <mzxreary (at) 0pointer (dot) de>
10
- *
11
- * This program is free software; you can redistribute it and/or modify
12
- * it under the terms of the GNU General Public License as published by
13
- * the Free Software Foundation; either version 2 of the License, or
14
- * (at your option) any later version.
15
- *
16
- * This program is distributed in the hope that it will be useful, but
17
- * WITHOUT ANY WARRANTY; without even the implied warranty of
18
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
- * General Public License for more details.
20
- *
21
- * You should have received a copy of the GNU General Public License
22
- * along with this program; if not, write to the Free Software
23
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24
- * 02110-1301, USA.
2511 *
2612 * This driver does below things:
2713 * 1. registers itself in the Linux backlight control in
....@@ -38,18 +24,18 @@
3824
3925 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
4026
41
-#include <linux/module.h>
42
-#include <linux/kernel.h>
43
-#include <linux/init.h>
4427 #include <linux/acpi.h>
45
-#include <linux/fb.h>
46
-#include <linux/mutex.h>
47
-#include <linux/err.h>
48
-#include <linux/i2c.h>
4928 #include <linux/backlight.h>
50
-#include <linux/platform_device.h>
5129 #include <linux/dmi.h>
30
+#include <linux/err.h>
31
+#include <linux/fb.h>
32
+#include <linux/i2c.h>
33
+#include <linux/kernel.h>
34
+#include <linux/module.h>
35
+#include <linux/mutex.h>
36
+#include <linux/platform_device.h>
5237 #include <linux/rfkill.h>
38
+
5339 #include <acpi/video.h>
5440
5541 #define DRIVER_NAME "intel_oaktrail"
....@@ -257,7 +243,7 @@
257243
258244 if (IS_ERR(bd)) {
259245 oaktrail_bl_device = NULL;
260
- pr_warning("Unable to register backlight device\n");
246
+ pr_warn("Unable to register backlight device\n");
261247 return PTR_ERR(bd);
262248 }
263249
....@@ -327,20 +313,20 @@
327313
328314 ret = platform_driver_register(&oaktrail_driver);
329315 if (ret) {
330
- pr_warning("Unable to register platform driver\n");
316
+ pr_warn("Unable to register platform driver\n");
331317 goto err_driver_reg;
332318 }
333319
334320 oaktrail_device = platform_device_alloc(DRIVER_NAME, -1);
335321 if (!oaktrail_device) {
336
- pr_warning("Unable to allocate platform device\n");
322
+ pr_warn("Unable to allocate platform device\n");
337323 ret = -ENOMEM;
338324 goto err_device_alloc;
339325 }
340326
341327 ret = platform_device_add(oaktrail_device);
342328 if (ret) {
343
- pr_warning("Unable to add platform device\n");
329
+ pr_warn("Unable to add platform device\n");
344330 goto err_device_add;
345331 }
346332
....@@ -352,7 +338,7 @@
352338
353339 ret = oaktrail_rfkill_init();
354340 if (ret) {
355
- pr_warning("Setup rfkill failed\n");
341
+ pr_warn("Setup rfkill failed\n");
356342 goto err_rfkill;
357343 }
358344