Commit 3e51b0d7 authored by Sultan Alsawaf's avatar Sultan Alsawaf Committed by arnavpuranik
Browse files

devfreq_boost: Clean up code style and update license header



Official Linux kernel style mandates function parameter alignment.

Also, update the license headers for the new style.
Signed-off-by: default avatarSultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: default avatarFrancisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: ronax's avatarronaxdevil <pratabidya.007@gmail.com>
Signed-off-by: rohan69's avatarreaPeR1010 <rohan10102002@gmail.com>
parent 64915915
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2018, Sultan Alsawaf <sultanxda@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* Copyright (C) 2018 Sultan Alsawaf <sultan@kerneltoast.com>.
*/
#define pr_fmt(fmt) "devfreq_boost: " fmt
......@@ -49,7 +41,7 @@ void devfreq_boost_kick(enum df_device device)
}
static void __devfreq_boost_kick_max(struct boost_dev *b,
unsigned int duration_ms)
unsigned int duration_ms)
{
unsigned long flags, new_expires;
......@@ -249,7 +241,7 @@ static void devfreq_max_unboost(struct work_struct *work)
}
static int fb_notifier_cb(struct notifier_block *nb,
unsigned long action, void *data)
unsigned long action, void *data)
{
struct df_boost_drv *d = container_of(nb, typeof(*d), fb_notif);
struct fb_event *evdata = data;
......@@ -277,7 +269,8 @@ static int fb_notifier_cb(struct notifier_block *nb,
}
static void devfreq_boost_input_event(struct input_handle *handle,
unsigned int type, unsigned int code, int value)
unsigned int type, unsigned int code,
int value)
{
struct df_boost_drv *d = handle->handler->private;
int i;
......@@ -287,7 +280,8 @@ static void devfreq_boost_input_event(struct input_handle *handle,
}
static int devfreq_boost_input_connect(struct input_handler *handler,
struct input_dev *dev, const struct input_device_id *id)
struct input_dev *dev,
const struct input_device_id *id)
{
struct input_handle *handle;
int ret;
......@@ -332,7 +326,7 @@ static const struct input_device_id devfreq_boost_ids[] = {
.evbit = { BIT_MASK(EV_ABS) },
.absbit = { [BIT_WORD(ABS_MT_POSITION_X)] =
BIT_MASK(ABS_MT_POSITION_X) |
BIT_MASK(ABS_MT_POSITION_Y) },
BIT_MASK(ABS_MT_POSITION_Y) }
},
/* Touchpad */
{
......@@ -340,12 +334,12 @@ static const struct input_device_id devfreq_boost_ids[] = {
INPUT_DEVICE_ID_MATCH_ABSBIT,
.keybit = { [BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH) },
.absbit = { [BIT_WORD(ABS_X)] =
BIT_MASK(ABS_X) | BIT_MASK(ABS_Y) },
BIT_MASK(ABS_X) | BIT_MASK(ABS_Y) }
},
/* Keypad */
{
.flags = INPUT_DEVICE_ID_MATCH_EVBIT,
.evbit = { BIT_MASK(EV_KEY) },
.evbit = { BIT_MASK(EV_KEY) }
},
{ }
};
......
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2018, Sultan Alsawaf <sultanxda@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* Copyright (C) 2018 Sultan Alsawaf <sultan@kerneltoast.com>.
*/
#ifndef _DEVFREQ_BOOST_H_
#define _DEVFREQ_BOOST_H_
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment