can: slcan: remove casts from tty->disc_data
tty->disc_data is 'void *', so there is no need to cast from that. Therefore remove the casts and assign the pointer directly. Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Cc: Dario Binacchi <dario.binacchi@amarulasolutions.com> Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: Marc Kleine-Budde <mkl@pengutronix.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: Eric Dumazet <edumazet@google.com> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Paolo Abeni <pabeni@redhat.com> Cc: linux-can@vger.kernel.org Cc: netdev@vger.kernel.org Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://lore.kernel.org/r/20230731080244.2698-6-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ca1a8d2f50
commit
0e4a23ce7c
@ -583,7 +583,7 @@ static void slcan_transmit(struct work_struct *work)
|
||||
*/
|
||||
static void slcan_write_wakeup(struct tty_struct *tty)
|
||||
{
|
||||
struct slcan *sl = (struct slcan *)tty->disc_data;
|
||||
struct slcan *sl = tty->disc_data;
|
||||
|
||||
schedule_work(&sl->tx_work);
|
||||
}
|
||||
@ -778,7 +778,7 @@ static void slcan_receive_buf(struct tty_struct *tty,
|
||||
const unsigned char *cp, const char *fp,
|
||||
int count)
|
||||
{
|
||||
struct slcan *sl = (struct slcan *)tty->disc_data;
|
||||
struct slcan *sl = tty->disc_data;
|
||||
|
||||
if (!netif_running(sl->dev))
|
||||
return;
|
||||
@ -862,7 +862,7 @@ static int slcan_open(struct tty_struct *tty)
|
||||
*/
|
||||
static void slcan_close(struct tty_struct *tty)
|
||||
{
|
||||
struct slcan *sl = (struct slcan *)tty->disc_data;
|
||||
struct slcan *sl = tty->disc_data;
|
||||
|
||||
unregister_candev(sl->dev);
|
||||
|
||||
@ -886,7 +886,7 @@ static void slcan_close(struct tty_struct *tty)
|
||||
static int slcan_ioctl(struct tty_struct *tty, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
struct slcan *sl = (struct slcan *)tty->disc_data;
|
||||
struct slcan *sl = tty->disc_data;
|
||||
unsigned int tmp;
|
||||
|
||||
switch (cmd) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user