mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Markus Pargmann <mpa@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/5] ubi: Add getter ubi_volume_get_cdev()
Date: Tue,  8 Mar 2016 11:56:06 +0100	[thread overview]
Message-ID: <1457434569-32054-2-git-send-email-mpa@pengutronix.de> (raw)
In-Reply-To: <1457434569-32054-1-git-send-email-mpa@pengutronix.de>

cdev is used in a future commit to find the mounted filesystems.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 drivers/mtd/ubi/kapi.c  | 5 +++++
 include/linux/mtd/ubi.h | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/drivers/mtd/ubi/kapi.c b/drivers/mtd/ubi/kapi.c
index 7fc1aa8d70cc..c2e58e865753 100644
--- a/drivers/mtd/ubi/kapi.c
+++ b/drivers/mtd/ubi/kapi.c
@@ -308,6 +308,11 @@ void ubi_close_volume(struct ubi_volume_desc *desc)
 }
 EXPORT_SYMBOL_GPL(ubi_close_volume);
 
+struct cdev *ubi_volume_get_cdev(struct ubi_volume_desc *vol)
+{
+	return &vol->vol->cdev;
+}
+
 /**
  * ubi_leb_read - read data.
  * @desc: volume descriptor
diff --git a/include/linux/mtd/ubi.h b/include/linux/mtd/ubi.h
index 0614681d731c..0725b04f9dfd 100644
--- a/include/linux/mtd/ubi.h
+++ b/include/linux/mtd/ubi.h
@@ -218,6 +218,8 @@ int ubi_is_mapped(struct ubi_volume_desc *desc, int lnum);
 int ubi_sync(int ubi_num);
 int ubi_flush(int ubi_num, int vol_id, int lnum);
 
+struct cdev *ubi_volume_get_cdev(struct ubi_volume_desc *vol);
+
 /*
  * This function is the same as the 'ubi_leb_read()' function, but it does not
  * provide the checking capability.
-- 
2.7.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2016-03-08 10:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-08 10:56 [PATCH 1/5] fs: Add for_each_fs_device_safe() Markus Pargmann
2016-03-08 10:56 ` Markus Pargmann [this message]
2016-03-08 10:56 ` [PATCH 3/5] ubi: Add helper to map a mtd device to a ubi number Markus Pargmann
2016-03-08 10:56 ` [PATCH 4/5] ubi: Helper to iterate over all ubi volumes Markus Pargmann
2016-03-08 10:56 ` [PATCH 5/5] ubiformat: Cleanly umount and detach the ubi before formating Markus Pargmann
2016-03-09  7:55   ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457434569-32054-2-git-send-email-mpa@pengutronix.de \
    --to=mpa@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox