Commit 2daedb1d authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman

tty: con3215, remove tty->driver_data casts

Casts of 'void *' pointer are superfluous. So remove them.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux390@de.ibm.com
Cc: linux-s390@vger.kernel.org
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210302062214.29627-20-jslaby@suse.czSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 56e9d0f9
...@@ -911,9 +911,8 @@ static int tty3215_open(struct tty_struct *tty, struct file * filp) ...@@ -911,9 +911,8 @@ static int tty3215_open(struct tty_struct *tty, struct file * filp)
*/ */
static void tty3215_close(struct tty_struct *tty, struct file * filp) static void tty3215_close(struct tty_struct *tty, struct file * filp)
{ {
struct raw3215_info *raw; struct raw3215_info *raw = tty->driver_data;
raw = (struct raw3215_info *) tty->driver_data;
if (raw == NULL || tty->count > 1) if (raw == NULL || tty->count > 1)
return; return;
tty->closing = 1; tty->closing = 1;
...@@ -928,9 +927,7 @@ static void tty3215_close(struct tty_struct *tty, struct file * filp) ...@@ -928,9 +927,7 @@ static void tty3215_close(struct tty_struct *tty, struct file * filp)
*/ */
static int tty3215_write_room(struct tty_struct *tty) static int tty3215_write_room(struct tty_struct *tty)
{ {
struct raw3215_info *raw; struct raw3215_info *raw = tty->driver_data;
raw = (struct raw3215_info *) tty->driver_data;
/* Subtract TAB_STOP_SIZE to allow for a tab, 8 <<< 64K */ /* Subtract TAB_STOP_SIZE to allow for a tab, 8 <<< 64K */
if ((RAW3215_BUFFER_SIZE - raw->count - TAB_STOP_SIZE) >= 0) if ((RAW3215_BUFFER_SIZE - raw->count - TAB_STOP_SIZE) >= 0)
...@@ -945,10 +942,9 @@ static int tty3215_write_room(struct tty_struct *tty) ...@@ -945,10 +942,9 @@ static int tty3215_write_room(struct tty_struct *tty)
static int tty3215_write(struct tty_struct * tty, static int tty3215_write(struct tty_struct * tty,
const unsigned char *buf, int count) const unsigned char *buf, int count)
{ {
struct raw3215_info *raw; struct raw3215_info *raw = tty->driver_data;
int i, written; int i, written;
raw = (struct raw3215_info *) tty->driver_data;
written = count; written = count;
while (count > 0) { while (count > 0) {
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
...@@ -971,10 +967,10 @@ static int tty3215_write(struct tty_struct * tty, ...@@ -971,10 +967,10 @@ static int tty3215_write(struct tty_struct * tty,
*/ */
static int tty3215_put_char(struct tty_struct *tty, unsigned char ch) static int tty3215_put_char(struct tty_struct *tty, unsigned char ch)
{ {
struct raw3215_info *raw; struct raw3215_info *raw = tty->driver_data;
raw = (struct raw3215_info *) tty->driver_data;
raw3215_putchar(raw, ch); raw3215_putchar(raw, ch);
return 1; return 1;
} }
...@@ -987,17 +983,15 @@ static void tty3215_flush_chars(struct tty_struct *tty) ...@@ -987,17 +983,15 @@ static void tty3215_flush_chars(struct tty_struct *tty)
*/ */
static int tty3215_chars_in_buffer(struct tty_struct *tty) static int tty3215_chars_in_buffer(struct tty_struct *tty)
{ {
struct raw3215_info *raw; struct raw3215_info *raw = tty->driver_data;
raw = (struct raw3215_info *) tty->driver_data;
return raw->count; return raw->count;
} }
static void tty3215_flush_buffer(struct tty_struct *tty) static void tty3215_flush_buffer(struct tty_struct *tty)
{ {
struct raw3215_info *raw; struct raw3215_info *raw = tty->driver_data;
raw = (struct raw3215_info *) tty->driver_data;
raw3215_flush_buffer(raw); raw3215_flush_buffer(raw);
tty_wakeup(tty); tty_wakeup(tty);
} }
...@@ -1007,9 +1001,8 @@ static void tty3215_flush_buffer(struct tty_struct *tty) ...@@ -1007,9 +1001,8 @@ static void tty3215_flush_buffer(struct tty_struct *tty)
*/ */
static void tty3215_throttle(struct tty_struct * tty) static void tty3215_throttle(struct tty_struct * tty)
{ {
struct raw3215_info *raw; struct raw3215_info *raw = tty->driver_data;
raw = (struct raw3215_info *) tty->driver_data;
raw->flags |= RAW3215_THROTTLED; raw->flags |= RAW3215_THROTTLED;
} }
...@@ -1018,10 +1011,9 @@ static void tty3215_throttle(struct tty_struct * tty) ...@@ -1018,10 +1011,9 @@ static void tty3215_throttle(struct tty_struct * tty)
*/ */
static void tty3215_unthrottle(struct tty_struct * tty) static void tty3215_unthrottle(struct tty_struct * tty)
{ {
struct raw3215_info *raw; struct raw3215_info *raw = tty->driver_data;
unsigned long flags; unsigned long flags;
raw = (struct raw3215_info *) tty->driver_data;
if (raw->flags & RAW3215_THROTTLED) { if (raw->flags & RAW3215_THROTTLED) {
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
raw->flags &= ~RAW3215_THROTTLED; raw->flags &= ~RAW3215_THROTTLED;
...@@ -1035,9 +1027,8 @@ static void tty3215_unthrottle(struct tty_struct * tty) ...@@ -1035,9 +1027,8 @@ static void tty3215_unthrottle(struct tty_struct * tty)
*/ */
static void tty3215_stop(struct tty_struct *tty) static void tty3215_stop(struct tty_struct *tty)
{ {
struct raw3215_info *raw; struct raw3215_info *raw = tty->driver_data;
raw = (struct raw3215_info *) tty->driver_data;
raw->flags |= RAW3215_STOPPED; raw->flags |= RAW3215_STOPPED;
} }
...@@ -1046,10 +1037,9 @@ static void tty3215_stop(struct tty_struct *tty) ...@@ -1046,10 +1037,9 @@ static void tty3215_stop(struct tty_struct *tty)
*/ */
static void tty3215_start(struct tty_struct *tty) static void tty3215_start(struct tty_struct *tty)
{ {
struct raw3215_info *raw; struct raw3215_info *raw = tty->driver_data;
unsigned long flags; unsigned long flags;
raw = (struct raw3215_info *) tty->driver_data;
if (raw->flags & RAW3215_STOPPED) { if (raw->flags & RAW3215_STOPPED) {
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
raw->flags &= ~RAW3215_STOPPED; raw->flags &= ~RAW3215_STOPPED;
......
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