Drop 'parent' argument of bdi_register() and bdi_register_va(). It is always NULL.
Unified · Split
| @@ -1782,7 +1782,7 @@ static struct backing_dev_info * __init mtd_bdi_init(char *name) · 1781 unmodified lines | ||
| 1782 | 1782 | * We put '-0' suffix to the name to get the same name format as we |
| 1783 | 1783 | * used to get. Since this is called only once, we get a unique name. |
| 1784 | 1784 | */ |
| 1785 | − ret = bdi_register(bdi, NULL, "%.28s-0", name); | |
| 1785 | + ret = bdi_register(bdi, "%.28s-0", name); | |
| 1786 | 1786 | if (ret) |
| 1787 | 1787 | bdi_put(bdi); |
| 1788 | 1788 | |
| @@ -1272,7 +1272,7 @@ int super_setup_bdi_name(struct super_block *sb, char *fmt, ...) · 1271 unmodified lines | ||
| 1272 | 1272 | bdi->name = sb->s_type->name; |
| 1273 | 1273 | |
| 1274 | 1274 | va_start(args, fmt); |
| 1275 | − err = bdi_register_va(bdi, NULL, fmt, args); | |
| 1275 | + err = bdi_register_va(bdi, fmt, args); | |
| 1276 | 1276 | va_end(args); |
| 1277 | 1277 | if (err) { |
| 1278 | 1278 | bdi_put(bdi); |
| @@ -25,11 +25,10 @@ static inline struct backing_dev_info *bdi_get(struct backing_dev_info *bdi) · 24 unmodified lines | ||
| 25 | 25 | |
| 26 | 26 | void bdi_put(struct backing_dev_info *bdi); |
| 27 | 27 | |
| 28 | −__printf(3, 4) | |
| 29 | −int bdi_register(struct backing_dev_info *bdi, struct device *parent, | |
| 30 | − const char *fmt, ...); | |
| 31 | −int bdi_register_va(struct backing_dev_info *bdi, struct device *parent, | |
| 32 | − const char *fmt, va_list args); | |
| 28 | +__printf(2, 3) | |
| 29 | +int bdi_register(struct backing_dev_info *bdi, const char *fmt, ...); | |
| 30 | +int bdi_register_va(struct backing_dev_info *bdi, const char *fmt, | |
| 31 | + va_list args); | |
| 33 | 32 | int bdi_register_owner(struct backing_dev_info *bdi, struct device *owner); |
| 34 | 33 | void bdi_unregister(struct backing_dev_info *bdi); |
| 35 | 34 | |
| @@ -856,15 +856,14 @@ struct backing_dev_info *bdi_alloc_node(gfp_t gfp_mask, int node_id) · 855 unmodified lines | ||
| 856 | 856 | } |
| 857 | 857 | EXPORT_SYMBOL(bdi_alloc_node); |
| 858 | 858 | |
| 859 | −int bdi_register_va(struct backing_dev_info *bdi, struct device *parent, | |
| 860 | − const char *fmt, va_list args) | |
| 859 | +int bdi_register_va(struct backing_dev_info *bdi, const char *fmt, va_list args) | |
| 861 | 860 | { |
| 862 | 861 | struct device *dev; |
| 863 | 862 | |
| 864 | 863 | if (bdi->dev) /* The driver needs to use separate queues per device */ |
| 865 | 864 | return 0; |
| 866 | 865 | |
| 867 | − dev = device_create_vargs(bdi_class, parent, MKDEV(0, 0), bdi, fmt, args); | |
| 866 | + dev = device_create_vargs(bdi_class, NULL, MKDEV(0, 0), bdi, fmt, args); | |
| 868 | 867 | if (IS_ERR(dev)) |
| 869 | 868 | return PTR_ERR(dev); |
| 870 | 869 | |
| @@ -883,14 +882,13 @@ int bdi_register_va(struct backing_dev_info *bdi, struct device *parent, · 12 unmodified lines | ||
| 883 | 882 | } |
| 884 | 883 | EXPORT_SYMBOL(bdi_register_va); |
| 885 | 884 | |
| 886 | −int bdi_register(struct backing_dev_info *bdi, struct device *parent, | |
| 887 | − const char *fmt, ...) | |
| 885 | +int bdi_register(struct backing_dev_info *bdi, const char *fmt, ...) | |
| 888 | 886 | { |
| 889 | 887 | va_list args; |
| 890 | 888 | int ret; |
| 891 | 889 | |
| 892 | 890 | va_start(args, fmt); |
| 893 | − ret = bdi_register_va(bdi, parent, fmt, args); | |
| 891 | + ret = bdi_register_va(bdi, fmt, args); | |
| 894 | 892 | va_end(args); |
| 895 | 893 | return ret; |
| 896 | 894 | } |
| @@ -900,8 +898,7 @@ int bdi_register_owner(struct backing_dev_info *bdi, struct device *owner) · 3 unmodified lines | ||
| 900 | 898 | { |
| 901 | 899 | int rc; |
| 902 | 900 | |
| 903 | − rc = bdi_register(bdi, NULL, "%u:%u", MAJOR(owner->devt), | |
| 904 | − MINOR(owner->devt)); | |
| 901 | + rc = bdi_register(bdi, "%u:%u", MAJOR(owner->devt), MINOR(owner->devt)); | |
| 905 | 902 | if (rc) |
| 906 | 903 | return rc; |
| 907 | 904 | /* Leaking owner reference... */ |