Skip to contentSkip to conversation

mtip32xx: add open/close handlers in block device ops

PATCH Asai Thambi S P 2 participants 2 messages May 8, 2014 – May 9, 2014 Block layer

lore
Share & tools
lore
#0 lore raw

Add open/close handlers to 'block_device_operations' instance.

---
 drivers/block/mtip32xx/mtip32xx.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
drivers/block/mtip32xx/mtip32xx.c +12 -0
index 7dc4fb4..bbbd83e 100644
@@ -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,
Signature · 1 line
1.7.1
#1 lore raw
Quoted 2 lines · Asai Thambi S P

Add open/close handlers to 'block_device_operations' instance.

There is no point in adding dead code like this.