* We put '-0' suffix to the name to get the same name format as we
* used to get. Since this is called only once, we get a unique name.
*/
- ret = bdi_register(bdi, NULL, "%.28s-0", name);
+ ret = bdi_register(bdi, "%.28s-0", name);
if (ret)
bdi_put(bdi);
bdi->name = sb->s_type->name;
va_start(args, fmt);
- err = bdi_register_va(bdi, NULL, fmt, args);
+ err = bdi_register_va(bdi, fmt, args);
va_end(args);
if (err) {
bdi_put(bdi);
void bdi_put(struct backing_dev_info *bdi);
-__printf(3, 4)
-int bdi_register(struct backing_dev_info *bdi, struct device *parent,
- const char *fmt, ...);
-int bdi_register_va(struct backing_dev_info *bdi, struct device *parent,
- const char *fmt, va_list args);
+__printf(2, 3)
+int bdi_register(struct backing_dev_info *bdi, const char *fmt, ...);
+int bdi_register_va(struct backing_dev_info *bdi, const char *fmt,
+ va_list args);
int bdi_register_owner(struct backing_dev_info *bdi, struct device *owner);
void bdi_unregister(struct backing_dev_info *bdi);
}
EXPORT_SYMBOL(bdi_alloc_node);
-int bdi_register_va(struct backing_dev_info *bdi, struct device *parent,
- const char *fmt, va_list args)
+int bdi_register_va(struct backing_dev_info *bdi, const char *fmt, va_list args)
{
struct device *dev;
if (bdi->dev) /* The driver needs to use separate queues per device */
return 0;
- dev = device_create_vargs(bdi_class, parent, MKDEV(0, 0), bdi, fmt, args);
+ dev = device_create_vargs(bdi_class, NULL, MKDEV(0, 0), bdi, fmt, args);
if (IS_ERR(dev))
return PTR_ERR(dev);
}
EXPORT_SYMBOL(bdi_register_va);
-int bdi_register(struct backing_dev_info *bdi, struct device *parent,
- const char *fmt, ...)
+int bdi_register(struct backing_dev_info *bdi, const char *fmt, ...)
{
va_list args;
int ret;
va_start(args, fmt);
- ret = bdi_register_va(bdi, parent, fmt, args);
+ ret = bdi_register_va(bdi, fmt, args);
va_end(args);
return ret;
}
{
int rc;
- rc = bdi_register(bdi, NULL, "%u:%u", MAJOR(owner->devt),
- MINOR(owner->devt));
+ rc = bdi_register(bdi, "%u:%u", MAJOR(owner->devt), MINOR(owner->devt));
if (rc)
return rc;
/* Leaking owner reference... */