Commit e9c14cd9 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/gregkh/linux/driver-2.6

into home.osdl.org:/home/torvalds/v2.5/linux
parents 339effbb 1308c2ac
......@@ -194,6 +194,12 @@ static void class_dev_release(struct kobject * kobj)
if (cls->release)
cls->release(cd);
else {
printk(KERN_ERR "Device class '%s' does not have a release() function, "
"it is broken and must be fixed.\n",
cd->class_id);
WARN_ON(1);
}
}
static struct kobj_type ktype_class_device = {
......
......@@ -78,6 +78,12 @@ static void device_release(struct kobject * kobj)
struct device * dev = to_dev(kobj);
if (dev->release)
dev->release(dev);
else {
printk(KERN_ERR "Device '%s' does not have a release() function, "
"it is broken and must be fixed.\n",
dev->bus_id);
WARN_ON(1);
}
}
static struct kobj_type ktype_device = {
......@@ -211,8 +217,7 @@ int device_add(struct device *dev)
parent = get_device(dev->parent);
pr_debug("DEV: registering device: ID = '%s', name = %s\n",
dev->bus_id, dev->name);
pr_debug("DEV: registering device: ID = '%s'\n", dev->bus_id);
/* first, register with generic layer. */
strlcpy(dev->kobj.name,dev->bus_id,KOBJ_NAME_LEN);
......@@ -342,8 +347,7 @@ void device_del(struct device * dev)
*/
void device_unregister(struct device * dev)
{
pr_debug("DEV: Unregistering device. ID = '%s', name = '%s'\n",
dev->bus_id,dev->name);
pr_debug("DEV: Unregistering device. ID = '%s'\n", dev->bus_id);
device_del(dev);
put_device(dev);
}
......
......@@ -14,13 +14,6 @@
#include <linux/stat.h>
#include <linux/string.h>
static ssize_t device_read_name(struct device * dev, char * buf)
{
return sprintf(buf,"%s\n",dev->name);
}
static DEVICE_ATTR(name,S_IRUGO,device_read_name,NULL);
/**
* detach_state - control the default power state for the device.
*
......@@ -53,7 +46,6 @@ static DEVICE_ATTR(detach_state,0644,detach_show,detach_store);
struct attribute * dev_default_attrs[] = {
&dev_attr_name.attr,
&dev_attr_detach_state.attr,
NULL,
};
......@@ -15,7 +15,6 @@
#include <linux/init.h>
struct device legacy_bus = {
.name = "legacy bus",
.bus_id = "legacy",
};
......
......@@ -4232,9 +4232,6 @@ static int have_no_fdc= -ENODEV;
static struct platform_device floppy_device = {
.name = "floppy",
.id = 0,
.dev = {
.name = "Floppy Drive",
},
};
static struct kobject *floppy_find(dev_t dev, int *part, void *data)
......
......@@ -648,7 +648,6 @@ static void hwif_register (ide_hwif_t *hwif)
{
/* register with global device tree */
strlcpy(hwif->gendev.bus_id,hwif->name,BUS_ID_SIZE);
snprintf(hwif->gendev.name,DEVICE_NAME_SIZE,"IDE Controller");
hwif->gendev.driver_data = hwif;
if (hwif->pci_dev)
hwif->gendev.parent = &hwif->pci_dev->dev;
......@@ -1217,8 +1216,6 @@ static void init_gendisk (ide_hwif_t *hwif)
ide_add_generic_settings(drive);
snprintf(drive->gendev.bus_id,BUS_ID_SIZE,"%u.%u",
hwif->index,unit);
snprintf(drive->gendev.name,DEVICE_NAME_SIZE,
"%s","IDE Drive");
drive->gendev.parent = &hwif->gendev;
drive->gendev.bus = &ide_bus_type;
drive->gendev.driver_data = drive;
......
......@@ -315,7 +315,7 @@ int __devinit init_bttv_i2c(struct bttv *btv)
memcpy(&btv->i2c_client, &bttv_i2c_client_template,
sizeof(struct i2c_client));
sprintf(btv->i2c_adap.dev.name, "bt848 #%d", btv->nr);
sprintf(btv->i2c_adap.name, "bt848 #%d", btv->nr);
btv->i2c_adap.dev.parent = &btv->dev->dev;
btv->i2c_algo.data = btv;
......
......@@ -1361,9 +1361,6 @@ static struct device_driver i82365_driver = {
static struct platform_device i82365_device = {
.name = "i82365",
.id = 0,
.dev = {
.name = "i82365",
},
};
static int __init init_i82365(void)
......
......@@ -372,9 +372,6 @@ static struct device_driver tcic_driver = {
static struct platform_device tcic_device = {
.name = "tcic-pcmcia",
.id = 0,
.dev = {
.name = "tcic-pcmcia",
},
};
......
......@@ -899,7 +899,7 @@ static int __devinit yenta_probe (struct pci_dev *dev, const struct pci_device_i
/* We must finish initialization here */
if (!socket->cb_irq || request_irq(socket->cb_irq, yenta_interrupt, SA_SHIRQ, socket->dev->dev.name, socket)) {
if (!socket->cb_irq || request_irq(socket->cb_irq, yenta_interrupt, SA_SHIRQ, pci_name(socket->dev), socket)) {
/* No IRQ or request_irq failed. Poll */
socket->cb_irq = 0; /* But zero is a valid IRQ number. */
init_timer(&socket->poll_timer);
......
......@@ -1566,7 +1566,6 @@ device_initcall(scsi_debug_init);
module_exit(scsi_debug_exit);
static struct device pseudo_primary = {
.name = "Host/Pseudo Bridge",
.bus_id = "pseudo_0",
};
......@@ -1630,7 +1629,6 @@ static int sdebug_add_adapter()
sdbg_host->dev.bus = &pseudo_lld_bus;
sdbg_host->dev.parent = &pseudo_primary;
sdbg_host->dev.release = &sdebug_release_adapter;
sprintf(sdbg_host->dev.name, "scsi debug adapter");
sprintf(sdbg_host->dev.bus_id, "adapter%d", scsi_debug_add_host);
error = device_register(&sdbg_host->dev);
......
......@@ -447,24 +447,6 @@ static void scsi_probe_lun(struct scsi_request *sreq, char *inq_result,
return;
}
static void scsi_set_name(struct scsi_device *sdev, char *inq_result)
{
int i;
char type[72];
i = inq_result[0] & 0x1f;
if (i < MAX_SCSI_DEVICE_CODE)
strcpy(type, scsi_device_types[i]);
else
strcpy(type, "Unknown");
i = strlen(type) - 1;
while (i >= 0 && type[i] == ' ')
type[i--] = '\0';
snprintf(sdev->sdev_gendev.name, DEVICE_NAME_SIZE, "SCSI %s", type);
}
/**
* scsi_add_lun - allocate and fully initialze a Scsi_Device
* @sdevscan: holds information to be stored in the new Scsi_Device
......@@ -539,8 +521,6 @@ static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags)
printk(KERN_INFO "scsi: unknown device type %d\n", sdev->type);
}
scsi_set_name(sdev, inq_result);
print_inquiry(inq_result);
/*
......
......@@ -408,8 +408,6 @@ void scsi_sysfs_init_host(struct Scsi_Host *shost)
device_initialize(&shost->shost_gendev);
snprintf(shost->shost_gendev.bus_id, BUS_ID_SIZE, "host%d",
shost->host_no);
snprintf(shost->shost_gendev.name, DEVICE_NAME_SIZE, "%s",
shost->hostt->proc_name);
shost->shost_gendev.release = scsi_host_dev_release;
class_device_initialize(&shost->shost_classdev);
......
......@@ -254,7 +254,6 @@ struct device {
struct device * parent;
struct kobject kobj;
char name[DEVICE_NAME_SIZE]; /* descriptive ascii string */
char bus_id[BUS_ID_SIZE]; /* position on parent bus */
struct bus_type * bus; /* type of bus device is on */
......
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