| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0+ |
|---|
| 1 | 2 | /* |
|---|
| 2 | | - * intel_oaktrail.c - Intel OakTrail Platform support. |
|---|
| 3 | + * Intel OakTrail Platform support |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2010-2011 Intel Corporation |
|---|
| 5 | 6 | * Author: Yin Kangkai (kangkai.yin@intel.com) |
|---|
| .. | .. |
|---|
| 7 | 8 | * based on Compal driver, Copyright (C) 2008 Cezary Jackiewicz |
|---|
| 8 | 9 | * <cezary.jackiewicz (at) gmail.com>, based on MSI driver |
|---|
| 9 | 10 | * 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. |
|---|
| 25 | 11 | * |
|---|
| 26 | 12 | * This driver does below things: |
|---|
| 27 | 13 | * 1. registers itself in the Linux backlight control in |
|---|
| .. | .. |
|---|
| 38 | 24 | |
|---|
| 39 | 25 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
|---|
| 40 | 26 | |
|---|
| 41 | | -#include <linux/module.h> |
|---|
| 42 | | -#include <linux/kernel.h> |
|---|
| 43 | | -#include <linux/init.h> |
|---|
| 44 | 27 | #include <linux/acpi.h> |
|---|
| 45 | | -#include <linux/fb.h> |
|---|
| 46 | | -#include <linux/mutex.h> |
|---|
| 47 | | -#include <linux/err.h> |
|---|
| 48 | | -#include <linux/i2c.h> |
|---|
| 49 | 28 | #include <linux/backlight.h> |
|---|
| 50 | | -#include <linux/platform_device.h> |
|---|
| 51 | 29 | #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> |
|---|
| 52 | 37 | #include <linux/rfkill.h> |
|---|
| 38 | + |
|---|
| 53 | 39 | #include <acpi/video.h> |
|---|
| 54 | 40 | |
|---|
| 55 | 41 | #define DRIVER_NAME "intel_oaktrail" |
|---|
| .. | .. |
|---|
| 257 | 243 | |
|---|
| 258 | 244 | if (IS_ERR(bd)) { |
|---|
| 259 | 245 | oaktrail_bl_device = NULL; |
|---|
| 260 | | - pr_warning("Unable to register backlight device\n"); |
|---|
| 246 | + pr_warn("Unable to register backlight device\n"); |
|---|
| 261 | 247 | return PTR_ERR(bd); |
|---|
| 262 | 248 | } |
|---|
| 263 | 249 | |
|---|
| .. | .. |
|---|
| 327 | 313 | |
|---|
| 328 | 314 | ret = platform_driver_register(&oaktrail_driver); |
|---|
| 329 | 315 | if (ret) { |
|---|
| 330 | | - pr_warning("Unable to register platform driver\n"); |
|---|
| 316 | + pr_warn("Unable to register platform driver\n"); |
|---|
| 331 | 317 | goto err_driver_reg; |
|---|
| 332 | 318 | } |
|---|
| 333 | 319 | |
|---|
| 334 | 320 | oaktrail_device = platform_device_alloc(DRIVER_NAME, -1); |
|---|
| 335 | 321 | if (!oaktrail_device) { |
|---|
| 336 | | - pr_warning("Unable to allocate platform device\n"); |
|---|
| 322 | + pr_warn("Unable to allocate platform device\n"); |
|---|
| 337 | 323 | ret = -ENOMEM; |
|---|
| 338 | 324 | goto err_device_alloc; |
|---|
| 339 | 325 | } |
|---|
| 340 | 326 | |
|---|
| 341 | 327 | ret = platform_device_add(oaktrail_device); |
|---|
| 342 | 328 | if (ret) { |
|---|
| 343 | | - pr_warning("Unable to add platform device\n"); |
|---|
| 329 | + pr_warn("Unable to add platform device\n"); |
|---|
| 344 | 330 | goto err_device_add; |
|---|
| 345 | 331 | } |
|---|
| 346 | 332 | |
|---|
| .. | .. |
|---|
| 352 | 338 | |
|---|
| 353 | 339 | ret = oaktrail_rfkill_init(); |
|---|
| 354 | 340 | if (ret) { |
|---|
| 355 | | - pr_warning("Setup rfkill failed\n"); |
|---|
| 341 | + pr_warn("Setup rfkill failed\n"); |
|---|
| 356 | 342 | goto err_rfkill; |
|---|
| 357 | 343 | } |
|---|
| 358 | 344 | |
|---|