Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdf4a494 authored by Dominique van den Broeck's avatar Dominique van den Broeck Committed by Greg Kroah-Hartman
Browse files

staging: panel: (coding style) Line alignments and malloc sizeof



Style-only modifications to comply with checkpatch.pl --strict --file.
. Correctly realigns the lines that needed to be ;
. Suppress useless blank rows ;
. Fix sizeof() issues in various -malloc() functions.

Signed-off-by: default avatarDominique van den Broeck <domdevlin@free.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3ac76904
Loading
Loading
Loading
Loading
+11 −13
Original line number Diff line number Diff line
@@ -951,7 +951,6 @@ static void lcd_clear_display(void)

static void lcd_init_display(void)
{

	lcd_flags = ((lcd_height > 1) ? LCD_FLAG_N : 0)
	    | LCD_FLAG_D | LCD_FLAG_C | LCD_FLAG_B;

@@ -1590,7 +1589,6 @@ static void lcd_init(void)
static ssize_t keypad_read(struct file *file,
			   char __user *buf, size_t count, loff_t *ppos)
{

	unsigned i = *ppos;
	char __user *tmp = buf;

@@ -1615,7 +1613,6 @@ static ssize_t keypad_read(struct file *file,

static int keypad_open(struct inode *inode, struct file *file)
{

	if (keypad_open_cnt)
		return -EBUSY;	/* open only once at a time */

@@ -1745,8 +1742,8 @@ static inline int input_state_high(struct logical_input *input)
	 * release function.
	 * eg: 0 -(press A)-> A -(press B)-> AB : don't match A's release.
	 */
	if (((phys_prev & input->mask) == input->value)
	    && ((phys_curr & input->mask) > input->value)) {
	if (((phys_prev & input->mask) == input->value) &&
	    ((phys_curr & input->mask) >  input->value)) {
		input->state = INPUT_ST_LOW; /* invalidate */
		return 1;
	}
@@ -1801,8 +1798,8 @@ static inline void input_state_falling(struct logical_input *input)
{
#if 0
	/* FIXME !!! same comment as in input_state_high */
	if (((phys_prev & input->mask) == input->value)
	    && ((phys_curr & input->mask) > input->value)) {
	if (((phys_prev & input->mask) == input->value) &&
	    ((phys_curr & input->mask) >  input->value)) {
		input->state = INPUT_ST_LOW;	/* invalidate */
		return;
	}
@@ -1960,9 +1957,10 @@ static int input_name2mask(const char *name, pmask_t *mask, pmask_t *value,
	while (*name) {
		int in, out, bit, neg;

		for (in = 0; (in < sizeof(sigtab)) &&
			     (sigtab[in] != *name); in++)
		for (in = 0; (in < sizeof(sigtab)) && (sigtab[in] != *name);
		     in++)
			;

		if (in >= sizeof(sigtab))
			return 0;	/* input name not found */
		neg = (in & 1);	/* odd (lower) names are negated */
@@ -2005,7 +2003,7 @@ static struct logical_input *panel_bind_key(const char *name, const char *press,
{
	struct logical_input *key;

	key = kzalloc(sizeof(struct logical_input), GFP_KERNEL);
	key = kzalloc(sizeof(*key), GFP_KERNEL);
	if (!key)
		return NULL;

@@ -2043,7 +2041,7 @@ static struct logical_input *panel_bind_callback(char *name,
{
	struct logical_input *callback;

	callback = kmalloc(sizeof(struct logical_input), GFP_KERNEL);
	callback = kmalloc(sizeof(*callback), GFP_KERNEL);
	if (!callback)
		return NULL;