Staging: ipack: remove board_name and bus_name fields from struct ipack_device
Removed board_name and bus_name fields from struct ipack_device that are completely useless. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ec440335b1
commit
611b564d19
|
@ -371,9 +371,7 @@ static irqreturn_t tpci200_interrupt(int irq, void *dev_id)
|
||||||
|
|
||||||
#ifdef CONFIG_SYSFS
|
#ifdef CONFIG_SYSFS
|
||||||
|
|
||||||
static struct ipack_device *tpci200_slot_register(const char *board_name,
|
static struct ipack_device *tpci200_slot_register(unsigned int tpci200_number,
|
||||||
int size,
|
|
||||||
unsigned int tpci200_number,
|
|
||||||
unsigned int slot_position)
|
unsigned int slot_position)
|
||||||
{
|
{
|
||||||
int found = 0;
|
int found = 0;
|
||||||
|
@ -437,7 +435,7 @@ static ssize_t tpci200_store_board(struct device *pdev, const char *buf,
|
||||||
if (dev != NULL)
|
if (dev != NULL)
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
|
|
||||||
dev = tpci200_slot_register(buf, count, card->number, slot);
|
dev = tpci200_slot_register(card->number, slot);
|
||||||
if (dev == NULL)
|
if (dev == NULL)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
@ -450,7 +448,7 @@ static ssize_t tpci200_show_board(struct device *pdev, char *buf, int slot)
|
||||||
struct ipack_device *dev = card->slots[slot].dev;
|
struct ipack_device *dev = card->slots[slot].dev;
|
||||||
|
|
||||||
if (dev != NULL)
|
if (dev != NULL)
|
||||||
return snprintf(buf, PAGE_SIZE, "%s\n", dev->board_name);
|
return snprintf(buf, PAGE_SIZE, "%s\n", dev_name(&dev->dev));
|
||||||
else
|
else
|
||||||
return snprintf(buf, PAGE_SIZE, "none\n");
|
return snprintf(buf, PAGE_SIZE, "none\n");
|
||||||
}
|
}
|
||||||
|
@ -975,17 +973,7 @@ static int tpci200_request_irq(struct ipack_device *dev, int vector,
|
||||||
slot_irq->vector = vector;
|
slot_irq->vector = vector;
|
||||||
slot_irq->handler = handler;
|
slot_irq->handler = handler;
|
||||||
slot_irq->arg = arg;
|
slot_irq->arg = arg;
|
||||||
if (dev->board_name) {
|
slot_irq->name = dev_name(&dev->dev);
|
||||||
if (strlen(dev->board_name) > IPACK_IRQ_NAME_SIZE) {
|
|
||||||
pr_warning("Slot [%s %d:%d] IRQ name too long (%d char > %d char MAX). Will be truncated!\n",
|
|
||||||
TPCI200_SHORTNAME, dev->bus_nr, dev->slot,
|
|
||||||
(int)strlen(dev->board_name),
|
|
||||||
IPACK_IRQ_NAME_SIZE);
|
|
||||||
}
|
|
||||||
strncpy(slot_irq->name, dev->board_name, IPACK_IRQ_NAME_SIZE-1);
|
|
||||||
} else {
|
|
||||||
strcpy(slot_irq->name, "Unknown");
|
|
||||||
}
|
|
||||||
|
|
||||||
tpci200->slots[dev->slot].irq = slot_irq;
|
tpci200->slots[dev->slot].irq = slot_irq;
|
||||||
res = __tpci200_request_irq(tpci200, dev);
|
res = __tpci200_request_irq(tpci200, dev);
|
||||||
|
|
|
@ -115,7 +115,7 @@ struct slot_irq {
|
||||||
int vector;
|
int vector;
|
||||||
int (*handler)(void *);
|
int (*handler)(void *);
|
||||||
void *arg;
|
void *arg;
|
||||||
char name[IPACK_IRQ_NAME_SIZE];
|
const char *name;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
|
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
|
|
||||||
#define IPACK_BOARD_NAME_SIZE 16
|
|
||||||
#define IPACK_IRQ_NAME_SIZE 50
|
|
||||||
#define IPACK_IDPROM_OFFSET_I 0x01
|
#define IPACK_IDPROM_OFFSET_I 0x01
|
||||||
#define IPACK_IDPROM_OFFSET_P 0x03
|
#define IPACK_IDPROM_OFFSET_P 0x03
|
||||||
#define IPACK_IDPROM_OFFSET_A 0x05
|
#define IPACK_IDPROM_OFFSET_A 0x05
|
||||||
|
@ -64,8 +62,6 @@ struct ipack_addr_space {
|
||||||
* by the carrier board throught bus->ops.
|
* by the carrier board throught bus->ops.
|
||||||
*/
|
*/
|
||||||
struct ipack_device {
|
struct ipack_device {
|
||||||
char board_name[IPACK_BOARD_NAME_SIZE];
|
|
||||||
char bus_name[IPACK_BOARD_NAME_SIZE];
|
|
||||||
unsigned int bus_nr;
|
unsigned int bus_nr;
|
||||||
unsigned int slot;
|
unsigned int slot;
|
||||||
unsigned int irq;
|
unsigned int irq;
|
||||||
|
|
Loading…
Reference in New Issue