[rtems commit] SPI SD-Card: adapt common driver code to block devices core API changes.

Sebastian Huber sebh at rtems.org
Mon Mar 31 08:09:16 UTC 2014


Module:    rtems
Branch:    master
Commit:    3c21ad7db0584ecc0fe66259b95f32a9b454d617
Changeset: http://git.rtems.org/rtems/commit/?id=3c21ad7db0584ecc0fe66259b95f32a9b454d617

Author:    Pavel Pisa <ppisa4lists at pikron.com>
Date:      Mon Mar 31 08:39:59 2014 +0200

SPI SD-Card: adapt common driver code to block devices core API changes.

---

 c/src/libchip/i2c/spi-sd-card.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/c/src/libchip/i2c/spi-sd-card.c b/c/src/libchip/i2c/spi-sd-card.c
index f6db0ce..b33fddd 100644
--- a/c/src/libchip/i2c/spi-sd-card.c
+++ b/c/src/libchip/i2c/spi-sd-card.c
@@ -1238,7 +1238,8 @@ sd_card_disk_block_write_cleanup:
 
 static int sd_card_disk_ioctl( rtems_disk_device *dd, uint32_t req, void *arg)
 {
-	RTEMS_DEBUG_PRINT( "dev = %u, req = %u, arg = 0x08%x\n", dev, req, arg);
+	RTEMS_DEBUG_PRINT( "sd_card_disk_ioctl minor = %u, req = 0x%08x, arg = %p\n",
+	                (unsigned)rtems_filesystem_dev_minor_t(dd->dev), (unsigned)req, arg);
 	if (req == RTEMS_BLKIO_REQUEST) {
 		rtems_device_minor_number minor = rtems_disk_get_minor_number( dd);
 		sd_card_driver_entry *e = &sd_card_driver_table [minor];
@@ -1267,8 +1268,7 @@ static int sd_card_disk_ioctl( rtems_disk_device *dd, uint32_t req, void *arg)
 		*(uint32_t *) arg = RTEMS_BLKDEV_CAP_MULTISECTOR_CONT;
 		return 0;
 	} else {
-		errno = EINVAL;
-		return -1;
+		return rtems_blkdev_ioctl( dd, req, arg );
 	}
 }
 




More information about the vc mailing list