Skip to content

Commit 6a5180c

Browse files
committed
Input: zforce_ts - remove assert/deassert wrappers
The wrappers are extremely simple, used once, and do not bring much value. Remove them. Tested-by: Andreas Kemnade <[email protected]> # Tolino Shine2HD Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 7846bd8 commit 6a5180c

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

drivers/input/touchscreen/zforce_ts.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -146,16 +146,6 @@ static int zforce_command(struct zforce_ts *ts, u8 cmd)
146146
return 0;
147147
}
148148

149-
static void zforce_reset_assert(struct zforce_ts *ts)
150-
{
151-
gpiod_set_value_cansleep(ts->gpio_rst, 1);
152-
}
153-
154-
static void zforce_reset_deassert(struct zforce_ts *ts)
155-
{
156-
gpiod_set_value_cansleep(ts->gpio_rst, 0);
157-
}
158-
159149
static int zforce_send_wait(struct zforce_ts *ts, const char *buf, int len)
160150
{
161151
struct i2c_client *client = ts->client;
@@ -672,7 +662,7 @@ static void zforce_reset(void *data)
672662
{
673663
struct zforce_ts *ts = data;
674664

675-
zforce_reset_assert(ts);
665+
gpiod_set_value_cansleep(ts->gpio_rst, 1);
676666
udelay(10);
677667
}
678668

@@ -807,7 +797,7 @@ static int zforce_probe(struct i2c_client *client)
807797
i2c_set_clientdata(client, ts);
808798

809799
/* let the controller boot */
810-
zforce_reset_deassert(ts);
800+
gpiod_set_value_cansleep(ts->gpio_rst, 0);
811801

812802
ts->command_waiting = NOTIFICATION_BOOTCOMPLETE;
813803
if (wait_for_completion_timeout(&ts->command_done, WAIT_TIMEOUT) == 0)

0 commit comments

Comments
 (0)