Commit 4a70cedd authored by Russell King's avatar Russell King

[ARM] Remove struct device .name usage.

parent 2927e486
...@@ -180,7 +180,7 @@ int amba_device_register(struct amba_device *dev, struct resource *parent) ...@@ -180,7 +180,7 @@ int amba_device_register(struct amba_device *dev, struct resource *parent)
dev->dev.release = amba_device_release; dev->dev.release = amba_device_release;
dev->dev.bus = &amba_bustype; dev->dev.bus = &amba_bustype;
dev->res.name = dev->dev.name; dev->res.name = dev->dev.bus_id;
ret = request_resource(parent, &dev->res); ret = request_resource(parent, &dev->res);
if (ret == 0) { if (ret == 0) {
...@@ -200,14 +200,6 @@ int amba_device_register(struct amba_device *dev, struct resource *parent) ...@@ -200,14 +200,6 @@ int amba_device_register(struct amba_device *dev, struct resource *parent)
if (cid == 0xb105f00d) if (cid == 0xb105f00d)
dev->periphid = pid; dev->periphid = pid;
if (dev->periphid)
snprintf(dev->dev.name, sizeof(dev->dev.name),
"AMBA PL%03X",
dev->periphid & 0xfff);
else
strlcpy(dev->dev.name, "AMBA unknown",
sizeof(dev->dev.name));
ret = device_register(&dev->dev); ret = device_register(&dev->dev);
if (ret == 0) { if (ret == 0) {
device_create_file(&dev->dev, &dev_attr_id); device_create_file(&dev->dev, &dev_attr_id);
......
...@@ -9,7 +9,7 @@ int __init platform_add_device(struct platform_device *dev) ...@@ -9,7 +9,7 @@ int __init platform_add_device(struct platform_device *dev)
for (i = 0; i < dev->num_resources; i++) { for (i = 0; i < dev->num_resources; i++) {
struct resource *r = &dev->resource[i]; struct resource *r = &dev->resource[i];
r->name = dev->dev.name; r->name = dev->dev.bus_id;
if (r->flags & IORESOURCE_MEM && if (r->flags & IORESOURCE_MEM &&
request_resource(&iomem_resource, r)) { request_resource(&iomem_resource, r)) {
......
...@@ -55,9 +55,6 @@ struct sa1111 { ...@@ -55,9 +55,6 @@ struct sa1111 {
static struct sa1111 *g_sa1111; static struct sa1111 *g_sa1111;
static struct sa1111_dev usb_dev = { static struct sa1111_dev usb_dev = {
.dev = {
.name = "Intel Corporation SA1111 [USB Controller]",
},
.skpcr_mask = SKPCR_UCLKEN, .skpcr_mask = SKPCR_UCLKEN,
.devid = SA1111_DEVID_USB, .devid = SA1111_DEVID_USB,
.irq = { .irq = {
...@@ -71,9 +68,6 @@ static struct sa1111_dev usb_dev = { ...@@ -71,9 +68,6 @@ static struct sa1111_dev usb_dev = {
}; };
static struct sa1111_dev sac_dev = { static struct sa1111_dev sac_dev = {
.dev = {
.name = "Intel Corporation SA1111 [Audio Controller]",
},
.skpcr_mask = SKPCR_I2SCLKEN | SKPCR_L3CLKEN, .skpcr_mask = SKPCR_I2SCLKEN | SKPCR_L3CLKEN,
.devid = SA1111_DEVID_SAC, .devid = SA1111_DEVID_SAC,
.irq = { .irq = {
...@@ -85,17 +79,11 @@ static struct sa1111_dev sac_dev = { ...@@ -85,17 +79,11 @@ static struct sa1111_dev sac_dev = {
}; };
static struct sa1111_dev ssp_dev = { static struct sa1111_dev ssp_dev = {
.dev = {
.name = "Intel Corporation SA1111 [SSP Controller]",
},
.skpcr_mask = SKPCR_SCLKEN, .skpcr_mask = SKPCR_SCLKEN,
.devid = SA1111_DEVID_SSP, .devid = SA1111_DEVID_SSP,
}; };
static struct sa1111_dev kbd_dev = { static struct sa1111_dev kbd_dev = {
.dev = {
.name = "Intel Corporation SA1111 [PS2]",
},
.skpcr_mask = SKPCR_PTCLKEN, .skpcr_mask = SKPCR_PTCLKEN,
.devid = SA1111_DEVID_PS2, .devid = SA1111_DEVID_PS2,
.irq = { .irq = {
...@@ -105,9 +93,6 @@ static struct sa1111_dev kbd_dev = { ...@@ -105,9 +93,6 @@ static struct sa1111_dev kbd_dev = {
}; };
static struct sa1111_dev mse_dev = { static struct sa1111_dev mse_dev = {
.dev = {
.name = "Intel Corporation SA1111 [PS2]",
},
.skpcr_mask = SKPCR_PMCLKEN, .skpcr_mask = SKPCR_PMCLKEN,
.devid = SA1111_DEVID_PS2, .devid = SA1111_DEVID_PS2,
.irq = { .irq = {
...@@ -117,17 +102,11 @@ static struct sa1111_dev mse_dev = { ...@@ -117,17 +102,11 @@ static struct sa1111_dev mse_dev = {
}; };
static struct sa1111_dev int_dev = { static struct sa1111_dev int_dev = {
.dev = {
.name = "Intel Corporation SA1111 [Interrupt Controller]",
},
.skpcr_mask = 0, .skpcr_mask = 0,
.devid = SA1111_DEVID_INT, .devid = SA1111_DEVID_INT,
}; };
static struct sa1111_dev pcmcia_dev = { static struct sa1111_dev pcmcia_dev = {
.dev = {
.name = "Intel Corporation SA1111 [PCMCIA Controller]",
},
.skpcr_mask = 0, .skpcr_mask = 0,
.devid = SA1111_DEVID_PCMCIA, .devid = SA1111_DEVID_PCMCIA,
.irq = { .irq = {
...@@ -570,7 +549,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, ...@@ -570,7 +549,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
sadev->dev.bus = &sa1111_bus_type; sadev->dev.bus = &sa1111_bus_type;
sadev->res.start = sachip->phys + offset; sadev->res.start = sachip->phys + offset;
sadev->res.end = sadev->res.start + 511; sadev->res.end = sadev->res.start + 511;
sadev->res.name = sadev->dev.name; sadev->res.name = sadev->dev.bus_id;
sadev->res.flags = IORESOURCE_MEM; sadev->res.flags = IORESOURCE_MEM;
sadev->mapbase = sachip->base + offset; sadev->mapbase = sachip->base + offset;
......
...@@ -811,7 +811,7 @@ static void ecard_proc_init(void) ...@@ -811,7 +811,7 @@ static void ecard_proc_init(void)
#define ec_set_resource(ec,nr,st,sz,flg) \ #define ec_set_resource(ec,nr,st,sz,flg) \
do { \ do { \
(ec)->resource[nr].name = ec->dev.name; \ (ec)->resource[nr].name = ec->dev.bus_id; \
(ec)->resource[nr].start = st; \ (ec)->resource[nr].start = st; \
(ec)->resource[nr].end = (st) + (sz) - 1; \ (ec)->resource[nr].end = (st) + (sz) - 1; \
(ec)->resource[nr].flags = flg; \ (ec)->resource[nr].flags = flg; \
...@@ -893,6 +893,22 @@ static ssize_t ecard_show_resources(struct device *dev, char *buf) ...@@ -893,6 +893,22 @@ static ssize_t ecard_show_resources(struct device *dev, char *buf)
static DEVICE_ATTR(resource, S_IRUGO, ecard_show_resources, NULL); static DEVICE_ATTR(resource, S_IRUGO, ecard_show_resources, NULL);
static ssize_t ecard_show_vendor(struct device *dev, char *buf)
{
struct expansion_card *ec = ECARD_DEV(dev);
return sprintf(buf, "%u\n", ec->manufacturer);
}
static DEVICE_ATTR(vendor, S_IRUGO, ecard_show_vendor, NULL);
static ssize_t ecard_show_device(struct device *dev, char *buf)
{
struct expansion_card *ec = ECARD_DEV(dev);
return sprintf(buf, "%u\n", ec->product);
}
static DEVICE_ATTR(device, S_IRUGO, ecard_show_device, NULL);
/* /*
* Probe for an expansion card. * Probe for an expansion card.
* *
...@@ -962,8 +978,6 @@ ecard_probe(int slot, card_type_t type) ...@@ -962,8 +978,6 @@ ecard_probe(int slot, card_type_t type)
} }
snprintf(ec->dev.bus_id, sizeof(ec->dev.bus_id), "ecard%d", slot); snprintf(ec->dev.bus_id, sizeof(ec->dev.bus_id), "ecard%d", slot);
snprintf(ec->dev.name, sizeof(ec->dev.name), "ecard %04x:%04x",
ec->cid.manufacturer, ec->cid.product);
ec->dev.parent = NULL; ec->dev.parent = NULL;
ec->dev.bus = &ecard_bus_type; ec->dev.bus = &ecard_bus_type;
ec->dev.dma_mask = &ec->dma_mask; ec->dev.dma_mask = &ec->dma_mask;
...@@ -1000,6 +1014,8 @@ ecard_probe(int slot, card_type_t type) ...@@ -1000,6 +1014,8 @@ ecard_probe(int slot, card_type_t type)
device_create_file(&ec->dev, &dev_attr_dma); device_create_file(&ec->dev, &dev_attr_dma);
device_create_file(&ec->dev, &dev_attr_irq); device_create_file(&ec->dev, &dev_attr_irq);
device_create_file(&ec->dev, &dev_attr_resource); device_create_file(&ec->dev, &dev_attr_resource);
device_create_file(&ec->dev, &dev_attr_vendor);
device_create_file(&ec->dev, &dev_attr_device);
return 0; return 0;
......
...@@ -104,9 +104,6 @@ static struct resource sa1111_resources[] = { ...@@ -104,9 +104,6 @@ static struct resource sa1111_resources[] = {
static struct platform_device sa1111_device = { static struct platform_device sa1111_device = {
.name = "sa1111", .name = "sa1111",
.id = 0, .id = 0,
.dev = {
.name = "Intel Corporation SA1111",
},
.num_resources = ARRAY_SIZE(sa1111_resources), .num_resources = ARRAY_SIZE(sa1111_resources),
.resource = sa1111_resources, .resource = sa1111_resources,
}; };
......
...@@ -46,7 +46,6 @@ static struct platform_device sa1111_device = { ...@@ -46,7 +46,6 @@ static struct platform_device sa1111_device = {
.name = "sa1111", .name = "sa1111",
.id = 0, .id = 0,
.dev = { .dev = {
.name = "Intel Corporation SA1111",
.dma_mask = &sa1111_dmamask, .dma_mask = &sa1111_dmamask,
}, },
.num_resources = ARRAY_SIZE(sa1111_resources), .num_resources = ARRAY_SIZE(sa1111_resources),
......
...@@ -54,7 +54,6 @@ static struct platform_device sa1111_device = { ...@@ -54,7 +54,6 @@ static struct platform_device sa1111_device = {
.name = "sa1111", .name = "sa1111",
.id = 0, .id = 0,
.dev = { .dev = {
.name = "Intel Corporation SA1111",
.dma_mask = &sa1111_dmamask; .dma_mask = &sa1111_dmamask;
}, },
.num_resources = ARRAY_SIZE(sa1111_resources), .num_resources = ARRAY_SIZE(sa1111_resources),
......
...@@ -144,7 +144,6 @@ static struct platform_device sa11x0udc_device = { ...@@ -144,7 +144,6 @@ static struct platform_device sa11x0udc_device = {
.name = "sa11x0-udc", .name = "sa11x0-udc",
.id = 0, .id = 0,
.dev = { .dev = {
.name = "Intel Corporation SA11x0 [UDC]",
.dma_mask = &sa11x0udc_dma_mask, .dma_mask = &sa11x0udc_dma_mask,
}, },
.num_resources = ARRAY_SIZE(sa11x0udc_resources), .num_resources = ARRAY_SIZE(sa11x0udc_resources),
...@@ -162,9 +161,6 @@ static struct resource sa11x0mcp_resources[] = { ...@@ -162,9 +161,6 @@ static struct resource sa11x0mcp_resources[] = {
static struct platform_device sa11x0mcp_device = { static struct platform_device sa11x0mcp_device = {
.name = "sa11x0-mcp", .name = "sa11x0-mcp",
.id = 0, .id = 0,
.dev = {
.name = "Intel Corporation SA11x0 [MCP]",
},
.num_resources = ARRAY_SIZE(sa11x0mcp_resources), .num_resources = ARRAY_SIZE(sa11x0mcp_resources),
.resource = sa11x0mcp_resources, .resource = sa11x0mcp_resources,
}; };
...@@ -183,7 +179,6 @@ static struct platform_device sa11x0ssp_device = { ...@@ -183,7 +179,6 @@ static struct platform_device sa11x0ssp_device = {
.name = "sa11x0-ssp", .name = "sa11x0-ssp",
.id = 0, .id = 0,
.dev = { .dev = {
.name = "Intel Corporation SA11x0 [SSP]",
.dma_mask = &sa11x0ssp_dma_mask, .dma_mask = &sa11x0ssp_dma_mask,
}, },
.num_resources = ARRAY_SIZE(sa11x0ssp_resources), .num_resources = ARRAY_SIZE(sa11x0ssp_resources),
...@@ -206,9 +201,6 @@ static struct resource sa11x0fb_resources[] = { ...@@ -206,9 +201,6 @@ static struct resource sa11x0fb_resources[] = {
static struct platform_device sa11x0fb_device = { static struct platform_device sa11x0fb_device = {
.name = "sa11x0-fb", .name = "sa11x0-fb",
.id = 0, .id = 0,
.dev = {
.name = "Intel Corporation SA11x0 [LCD]",
},
.num_resources = ARRAY_SIZE(sa11x0fb_resources), .num_resources = ARRAY_SIZE(sa11x0fb_resources),
.resource = sa11x0fb_resources, .resource = sa11x0fb_resources,
}; };
...@@ -216,9 +208,6 @@ static struct platform_device sa11x0fb_device = { ...@@ -216,9 +208,6 @@ static struct platform_device sa11x0fb_device = {
static struct platform_device sa11x0pcmcia_device = { static struct platform_device sa11x0pcmcia_device = {
.name = "sa11x0-pcmcia", .name = "sa11x0-pcmcia",
.id = 0, .id = 0,
.dev = {
.name = "Intel Corporation SA11x0 [PCMCIA]",
},
}; };
static struct platform_device *sa11x0_devices[] __initdata = { static struct platform_device *sa11x0_devices[] __initdata = {
......
...@@ -43,7 +43,6 @@ static struct platform_device sa1111_device = { ...@@ -43,7 +43,6 @@ static struct platform_device sa1111_device = {
.name = "sa1111", .name = "sa1111",
.id = 0, .id = 0,
.dev = { .dev = {
.name = "Intel Corporation SA1111",
.dma_mask = &sa1111_dmamask, .dma_mask = &sa1111_dmamask,
}, },
.num_resources = ARRAY_SIZE(sa1111_resources), .num_resources = ARRAY_SIZE(sa1111_resources),
......
...@@ -43,7 +43,6 @@ static struct platform_device sa1111_device = { ...@@ -43,7 +43,6 @@ static struct platform_device sa1111_device = {
.name = "sa1111", .name = "sa1111",
.id = 0, .id = 0,
.dev = { .dev = {
.name = "Intel Corporation SA1111",
.dma_mask = &sa1111_dmamask, .dma_mask = &sa1111_dmamask,
}, },
.num_resources = ARRAY_SIZE(sa1111_resources), .num_resources = ARRAY_SIZE(sa1111_resources),
......
...@@ -227,9 +227,6 @@ static struct resource neponset_resources[] = { ...@@ -227,9 +227,6 @@ static struct resource neponset_resources[] = {
static struct platform_device neponset_device = { static struct platform_device neponset_device = {
.name = "neponset", .name = "neponset",
.id = 0, .id = 0,
.dev = {
.name = "Neponset",
},
.num_resources = ARRAY_SIZE(neponset_resources), .num_resources = ARRAY_SIZE(neponset_resources),
.resource = neponset_resources, .resource = neponset_resources,
}; };
...@@ -253,7 +250,6 @@ static struct platform_device sa1111_device = { ...@@ -253,7 +250,6 @@ static struct platform_device sa1111_device = {
.name = "sa1111", .name = "sa1111",
.id = 0, .id = 0,
.dev = { .dev = {
.name = "Intel Corporation SA1111",
.dma_mask = &sa1111_dmamask, .dma_mask = &sa1111_dmamask,
}, },
.num_resources = ARRAY_SIZE(sa1111_resources), .num_resources = ARRAY_SIZE(sa1111_resources),
......
...@@ -38,7 +38,6 @@ static struct platform_device sa1111_device = { ...@@ -38,7 +38,6 @@ static struct platform_device sa1111_device = {
.name = "sa1111", .name = "sa1111",
.id = 0, .id = 0,
.dev = { .dev = {
.name = "Intel Corporation SA1111",
.dma_mask = &sa1111_dmamask, .dma_mask = &sa1111_dmamask,
}, },
.num_resources = ARRAY_SIZE(sa1111_resources), .num_resources = ARRAY_SIZE(sa1111_resources),
......
...@@ -392,7 +392,6 @@ static struct platform_device sa1111_device = { ...@@ -392,7 +392,6 @@ static struct platform_device sa1111_device = {
.name = "sa1111", .name = "sa1111",
.id = 0, .id = 0,
.dev = { .dev = {
.name = "Intel Corporation SA1111",
.dma_mask = &sa1111_dmamask, .dma_mask = &sa1111_dmamask,
}, },
.num_resources = ARRAY_SIZE(sa1111_resources), .num_resources = ARRAY_SIZE(sa1111_resources),
......
...@@ -44,7 +44,6 @@ static struct platform_device sa1111_device = { ...@@ -44,7 +44,6 @@ static struct platform_device sa1111_device = {
.name = "sa1111", .name = "sa1111",
.id = 0, .id = 0,
.dev = { .dev = {
.name = "Intel Corporation SA1111",
.dma_mask = &sa1111_dmamask, .dma_mask = &sa1111_dmamask,
}, },
.num_resources = ARRAY_SIZE(sa1111_resources), .num_resources = ARRAY_SIZE(sa1111_resources),
......
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