Commit 15c60a50 authored by Dmitry Eremin-Solenikov's avatar Dmitry Eremin-Solenikov Committed by Artem Bityutskiy

mtd: drop mtd_device_register

mtd_device_register() is a limited version of mtd_device_parse_register.
Replace it with macro calling mtd_device_parse_register().
Signed-off-by: default avatarDmitry Eremin-Solenikov <>
Signed-off-by: default avatarArtem Bityutskiy <>
parent 953b3bd1
......@@ -428,29 +428,6 @@ out_error:
return ret;
* mtd_device_register - register an MTD device.
* @master: the MTD device to register
* @parts: the partitions to register - only valid if nr_parts > 0
* @nr_parts: the number of partitions in parts. If zero then the full MTD
* device is registered
* Register an MTD device with the system and optionally, a number of
* partitions. If nr_parts is 0 then the whole device is registered, otherwise
* only the partitions are registered. To register both the full device *and*
* the partitions, call mtd_device_register() twice, once with nr_parts == 0
* and once equal to the number of partitions.
int mtd_device_register(struct mtd_info *master,
const struct mtd_partition *parts,
int nr_parts)
return parts ? add_mtd_partitions(master, parts, nr_parts) :
* mtd_device_parse_register - parse partitions and register an MTD device.
......@@ -325,14 +325,13 @@ static inline uint32_t mtd_mod_by_ws(uint64_t sz, struct mtd_info *mtd)
struct mtd_partition;
struct mtd_part_parser_data;
extern int mtd_device_register(struct mtd_info *master,
const struct mtd_partition *parts,
int nr_parts);
extern int mtd_device_parse_register(struct mtd_info *mtd,
const char **part_probe_types,
struct mtd_part_parser_data *parser_data,
const struct mtd_partition *defparts,
int defnr_parts);
#define mtd_device_register(master, parts, nr_parts) \
mtd_device_parse_register(master, NULL, NULL, parts, nr_parts)
extern int mtd_device_unregister(struct mtd_info *master);
extern struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num);
extern int __get_mtd_device(struct mtd_info *mtd);
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