Commit d2b88814 authored by Alan Cox's avatar Alan Cox Committed by David S. Miller

tty: driverdata and discdata are void *

Remove all the extra casting while we are cleaning up
Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8a1ec21e
...@@ -257,7 +257,7 @@ static void x25_asy_encaps(struct x25_asy *sl, unsigned char *icp, int len) ...@@ -257,7 +257,7 @@ static void x25_asy_encaps(struct x25_asy *sl, unsigned char *icp, int len)
static void x25_asy_write_wakeup(struct tty_struct *tty) static void x25_asy_write_wakeup(struct tty_struct *tty)
{ {
int actual; int actual;
struct x25_asy *sl = (struct x25_asy *) tty->disc_data; struct x25_asy *sl = tty->disc_data;
/* First make sure we're connected. */ /* First make sure we're connected. */
if (!sl || sl->magic != X25_ASY_MAGIC || !netif_running(sl->dev)) if (!sl || sl->magic != X25_ASY_MAGIC || !netif_running(sl->dev))
...@@ -523,7 +523,7 @@ static int x25_asy_close(struct net_device *dev) ...@@ -523,7 +523,7 @@ static int x25_asy_close(struct net_device *dev)
static void x25_asy_receive_buf(struct tty_struct *tty, static void x25_asy_receive_buf(struct tty_struct *tty,
const unsigned char *cp, char *fp, int count) const unsigned char *cp, char *fp, int count)
{ {
struct x25_asy *sl = (struct x25_asy *) tty->disc_data; struct x25_asy *sl = tty->disc_data;
if (!sl || sl->magic != X25_ASY_MAGIC || !netif_running(sl->dev)) if (!sl || sl->magic != X25_ASY_MAGIC || !netif_running(sl->dev))
return; return;
...@@ -551,7 +551,7 @@ static void x25_asy_receive_buf(struct tty_struct *tty, ...@@ -551,7 +551,7 @@ static void x25_asy_receive_buf(struct tty_struct *tty,
static int x25_asy_open_tty(struct tty_struct *tty) static int x25_asy_open_tty(struct tty_struct *tty)
{ {
struct x25_asy *sl = (struct x25_asy *) tty->disc_data; struct x25_asy *sl = tty->disc_data;
int err; int err;
if (tty->ops->write == NULL) if (tty->ops->write == NULL)
...@@ -592,7 +592,7 @@ static int x25_asy_open_tty(struct tty_struct *tty) ...@@ -592,7 +592,7 @@ static int x25_asy_open_tty(struct tty_struct *tty)
*/ */
static void x25_asy_close_tty(struct tty_struct *tty) static void x25_asy_close_tty(struct tty_struct *tty)
{ {
struct x25_asy *sl = (struct x25_asy *) tty->disc_data; struct x25_asy *sl = tty->disc_data;
/* First make sure we're connected. */ /* First make sure we're connected. */
if (!sl || sl->magic != X25_ASY_MAGIC) if (!sl || sl->magic != X25_ASY_MAGIC)
...@@ -692,7 +692,7 @@ static void x25_asy_unesc(struct x25_asy *sl, unsigned char s) ...@@ -692,7 +692,7 @@ static void x25_asy_unesc(struct x25_asy *sl, unsigned char s)
static int x25_asy_ioctl(struct tty_struct *tty, struct file *file, static int x25_asy_ioctl(struct tty_struct *tty, struct file *file,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
struct x25_asy *sl = (struct x25_asy *) tty->disc_data; struct x25_asy *sl = tty->disc_data;
/* First make sure we're connected. */ /* First make sure we're connected. */
if (!sl || sl->magic != X25_ASY_MAGIC) if (!sl || sl->magic != X25_ASY_MAGIC)
......
...@@ -1234,7 +1234,7 @@ static void ResetRadio(struct strip *strip_info) ...@@ -1234,7 +1234,7 @@ static void ResetRadio(struct strip *strip_info)
static void strip_write_some_more(struct tty_struct *tty) static void strip_write_some_more(struct tty_struct *tty)
{ {
struct strip *strip_info = (struct strip *) tty->disc_data; struct strip *strip_info = tty->disc_data;
/* First make sure we're connected. */ /* First make sure we're connected. */
if (!strip_info || strip_info->magic != STRIP_MAGIC || if (!strip_info || strip_info->magic != STRIP_MAGIC ||
...@@ -2259,7 +2259,7 @@ static void process_message(struct strip *strip_info) ...@@ -2259,7 +2259,7 @@ static void process_message(struct strip *strip_info)
static void strip_receive_buf(struct tty_struct *tty, const unsigned char *cp, static void strip_receive_buf(struct tty_struct *tty, const unsigned char *cp,
char *fp, int count) char *fp, int count)
{ {
struct strip *strip_info = (struct strip *) tty->disc_data; struct strip *strip_info = tty->disc_data;
const unsigned char *end = cp + count; const unsigned char *end = cp + count;
if (!strip_info || strip_info->magic != STRIP_MAGIC if (!strip_info || strip_info->magic != STRIP_MAGIC
...@@ -2594,7 +2594,7 @@ static struct strip *strip_alloc(void) ...@@ -2594,7 +2594,7 @@ static struct strip *strip_alloc(void)
static int strip_open(struct tty_struct *tty) static int strip_open(struct tty_struct *tty)
{ {
struct strip *strip_info = (struct strip *) tty->disc_data; struct strip *strip_info = tty->disc_data;
/* /*
* First make sure we're not already connected. * First make sure we're not already connected.
...@@ -2665,7 +2665,7 @@ static int strip_open(struct tty_struct *tty) ...@@ -2665,7 +2665,7 @@ static int strip_open(struct tty_struct *tty)
static void strip_close(struct tty_struct *tty) static void strip_close(struct tty_struct *tty)
{ {
struct strip *strip_info = (struct strip *) tty->disc_data; struct strip *strip_info = tty->disc_data;
/* /*
* First make sure we're connected. * First make sure we're connected.
...@@ -2691,7 +2691,7 @@ static void strip_close(struct tty_struct *tty) ...@@ -2691,7 +2691,7 @@ static void strip_close(struct tty_struct *tty)
static int strip_ioctl(struct tty_struct *tty, struct file *file, static int strip_ioctl(struct tty_struct *tty, struct file *file,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
struct strip *strip_info = (struct strip *) tty->disc_data; struct strip *strip_info = tty->disc_data;
/* /*
* First make sure we're connected. * First make sure we're connected.
......
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