[PATCH v2] SPI SD-Card: adapt common driver code to block devices core API changes.
Pavel Pisa
ppisa4lists at pikron.com
Mon Mar 31 06:39:59 UTC 2014
---
c/src/libchip/i2c/spi-sd-card.c | 6 +++---
1 file 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 03d4924..a24a141 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 );
}
}
--
1.7.10.4
More information about the devel
mailing list