Get rid of remaining DEVICE_TYPE_* usage
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
6459b135d9
commit
4b34297cfb
|
@ -26,17 +26,10 @@ char id[MAX_DRIVER_NAME];
|
|||
The id is used to uniquely identify a device in the system. The id will show up
|
||||
under /dev/ as the device's name. Usually this is something like eth0 or nor0.
|
||||
|
||||
unsigned long type;
|
||||
|
||||
This describes the type (or class) of this device. Have a look at include/driver.h
|
||||
to see a list of known device types. Currently this includes DEVICE_TYPE_ETHER,
|
||||
DEVICE_TYPE_CONSOLE and others.
|
||||
|
||||
void *type_data;
|
||||
|
||||
Devices of a particular class normaly need to store more information than struct
|
||||
device holds. This entry holds a pointer to the type specific struct, so a
|
||||
a device of type DEVICE_TYPE_ETHER sets this to a struct eth_device.
|
||||
device holds. This entry holds a pointer to the type specific struct.
|
||||
|
||||
void *priv;
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@ static struct device_d scb9328_serial_device = {
|
|||
.id = "cs0",
|
||||
.map_base = IMX_UART1_BASE,
|
||||
.size = 4096,
|
||||
.type = DEVICE_TYPE_CONSOLE,
|
||||
};
|
||||
|
||||
static int scb9328_console_init(void)
|
||||
|
@ -61,7 +60,6 @@ console_initcall(scb9328_console_init);
|
|||
|
||||
Serial drivers
|
||||
- Declare all functions static.
|
||||
- register a device of type DEVICE_TYPE_CONSOLE
|
||||
- in your probe function fill in a struct console_device and register it
|
||||
with console_register()
|
||||
|
||||
|
|
|
@ -64,7 +64,6 @@ static struct driver_d hf_drv = {
|
|||
.read = hf_read,
|
||||
.write = hf_write,
|
||||
.info = hf_info,
|
||||
.type = DEVICE_TYPE_BLOCK,
|
||||
};
|
||||
|
||||
static int hf_init(void)
|
||||
|
@ -88,7 +87,6 @@ int u_boot_register_filedev(struct hf_platform_data *hf, char *name_template)
|
|||
get_free_deviceid(dev->id, name_template);
|
||||
dev->size = hf->size;
|
||||
dev->map_base = hf->map_base;
|
||||
dev->type = DEVICE_TYPE_BLOCK;
|
||||
|
||||
return register_device(dev);
|
||||
}
|
||||
|
|
|
@ -272,10 +272,6 @@ static int do_nand(cmd_tbl_t *cmdtp, int argc, char *argv[])
|
|||
}
|
||||
dev = cdev->dev;
|
||||
|
||||
if (dev->type != DEVICE_TYPE_NAND_BB) {
|
||||
printf("not a nand bb device: %s\n", dev);
|
||||
return 1;
|
||||
}
|
||||
bb = dev->priv;
|
||||
close(bb->fd);
|
||||
unregister_device(dev);
|
||||
|
|
|
@ -160,7 +160,6 @@ static int nand_device_probe(struct device_d *dev)
|
|||
static struct driver_d nand_device_driver = {
|
||||
.name = "nand_device",
|
||||
.probe = nand_device_probe,
|
||||
.type = DEVICE_TYPE_NAND,
|
||||
};
|
||||
|
||||
static int nand_init(void)
|
||||
|
|
|
@ -27,18 +27,6 @@
|
|||
|
||||
#define MAX_DRIVER_NAME 32
|
||||
|
||||
#define DEVICE_TYPE_UNKNOWN 0
|
||||
#define DEVICE_TYPE_ETHER 1
|
||||
#define DEVICE_TYPE_CONSOLE 2
|
||||
#define DEVICE_TYPE_DRAM 3
|
||||
#define DEVICE_TYPE_BLOCK 4
|
||||
#define DEVICE_TYPE_FS 5
|
||||
#define DEVICE_TYPE_MIIPHY 6
|
||||
#define DEVICE_TYPE_NAND 7
|
||||
#define DEVICE_TYPE_NAND_BB 8
|
||||
#define DEVICE_TYPE_PARTITION 9
|
||||
#define MAX_DEVICE_TYPE 9
|
||||
|
||||
#include <param.h>
|
||||
|
||||
/**
|
||||
|
@ -91,9 +79,8 @@ struct device_d {
|
|||
void *platform_data; /*! board specific information about this device */
|
||||
|
||||
/*! Devices of a particular class normaly need to store more
|
||||
* information than struct device holds. This entry holds a pointer to
|
||||
* the type specific struct, so a a device of type DEVICE_TYPE_ETHER
|
||||
* sets this to a struct eth_device. */
|
||||
* information than struct device holds.
|
||||
*/
|
||||
void *priv;
|
||||
void *type_data; /*! In case this device is a specific device, this pointer
|
||||
* points to the type specific device, i.e. eth_device
|
||||
|
@ -107,11 +94,7 @@ struct device_d {
|
|||
|
||||
struct device_d *parent; /* our parent, NULL if not present */
|
||||
|
||||
/*! This describes the type (or class) of this device. Have a look at
|
||||
* include/driver.h to see a list of known device types. Currently this
|
||||
* includes DEVICE_TYPE_ETHER, DEVICE_TYPE_CONSOLE and others. */
|
||||
struct bus_type *bus;
|
||||
unsigned long type;
|
||||
|
||||
/*! The parameters for this device. This is used to carry information
|
||||
* of board specific data from the board code to the device driver. */
|
||||
|
|
Loading…
Reference in New Issue