public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* mtip32xx: add open/close handlers in block device ops
@ 2014-05-08 21:50 Asai Thambi S P
  2014-05-09  5:51 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Asai Thambi S P @ 2014-05-08 21:50 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel, Sam Bradshaw, Selvan Mani


Add open/close handlers to 'block_device_operations' instance.

Signed-off-by: Selvan Mani <smani@micron.com>
Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
---
 drivers/block/mtip32xx/mtip32xx.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index 7dc4fb4..bbbd83e 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -4010,6 +4010,16 @@ static int mtip_block_getgeo(struct block_device *dev,
 	return 0;
 }
 
+int mtip_block_open(struct block_device *disk, fmode_t mode)
+{
+	return 0;
+}
+
+void mtip_block_release(struct gendisk *disk, fmode_t mode)
+{
+	return;
+}
+
 /*
  * Block device operation function.
  *
@@ -4017,6 +4027,8 @@ static int mtip_block_getgeo(struct block_device *dev,
  * layer.
  */
 static const struct block_device_operations mtip_block_ops = {
+	.open 		= mtip_block_open,
+	.release	= mtip_block_release,
 	.ioctl		= mtip_block_ioctl,
 #ifdef CONFIG_COMPAT
 	.compat_ioctl	= mtip_block_compat_ioctl,
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: mtip32xx: add open/close handlers in block device ops
  2014-05-08 21:50 mtip32xx: add open/close handlers in block device ops Asai Thambi S P
@ 2014-05-09  5:51 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2014-05-09  5:51 UTC (permalink / raw)
  To: Asai Thambi S P; +Cc: Jens Axboe, linux-kernel, Sam Bradshaw, Selvan Mani

On Thu, May 08, 2014 at 02:50:38PM -0700, Asai Thambi S P wrote:
> 
> Add open/close handlers to 'block_device_operations' instance.

There is no point in adding dead code like this.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-09  5:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-08 21:50 mtip32xx: add open/close handlers in block device ops Asai Thambi S P
2014-05-09  5:51 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox