From: David Kershner Date: Thu, 1 Oct 2015 15:52:27 +0000 (-0400) Subject: staging: unisys: remove devdata->name use netdev->name X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6fce180320ba1fb9710f5f25577da84af12447e8;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git staging: unisys: remove devdata->name use netdev->name The net device already has a name, so use that instead. Signed-off-by: David Kershner Signed-off-by: Benjamin Romer Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c index 9d3c1e282062..be142ebc9821 100644 --- a/drivers/staging/unisys/visornic/visornic_main.c +++ b/drivers/staging/unisys/visornic/visornic_main.c @@ -119,7 +119,6 @@ struct visornic_devdata { * IOPART */ struct visor_device *dev; - char name[99]; struct list_head list_all; /* < link within list_all_devices list */ struct net_device *netdev; struct net_device_stats net_stats; @@ -1388,7 +1387,6 @@ devdata_initialize(struct visornic_devdata *devdata, struct visor_device *dev) return NULL; devdata->devnum = devnum; devdata->dev = dev; - strncpy(devdata->name, dev_name(&dev->device), sizeof(devdata->name)); spin_lock(&lock_all_devices); list_add_tail(&devdata->list_all, &list_all_devices); spin_unlock(&lock_all_devices); @@ -1964,7 +1962,6 @@ static void host_side_disappeared(struct visornic_devdata *devdata) unsigned long flags; spin_lock_irqsave(&devdata->priv_lock, flags); - sprintf(devdata->name, "", devdata->devnum); devdata->dev = NULL; /* indicate device destroyed */ spin_unlock_irqrestore(&devdata->priv_lock, flags); }