[PATCH 05/21] bsp/smdk2410: Use rtems_blkdev_create()
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon Aug 6 07:14:37 UTC 2018
Update #3358.
---
bsps/arm/smdk2410/smc/smc.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/bsps/arm/smdk2410/smc/smc.c b/bsps/arm/smdk2410/smc/smc.c
index 8291008336..459407f275 100644
--- a/bsps/arm/smdk2410/smc/smc.c
+++ b/bsps/arm/smdk2410/smc/smc.c
@@ -14,8 +14,7 @@
#include <string.h>
#include <inttypes.h>
-#include "rtems/blkdev.h"
-#include "rtems/diskdevs.h"
+#include <rtems/blkdev.h>
#include "smc.h"
#include <rtems/bspIo.h>
#include <s3c24xx.h>
@@ -392,19 +391,12 @@ smc_initialize(
void *arg)
{
rtems_status_code rc;
- dev_t dev;
uint32_t block_num;
- rc = rtems_disk_io_initialize();
- if (rc != RTEMS_SUCCESSFUL)
- return rc;
-
smc_init();
block_num = smc_info.blocks << 5;
- dev = rtems_filesystem_make_dev_t(major, 0);
- rc = rtems_disk_create_phys(dev, 512, block_num,
- smc_ioctl, NULL, SMC_DEVICE_NAME);
+ rc = rtems_blkdev_create(SMC_DEVICE_NAME, 512, block_num, smc_ioctl);
- return RTEMS_SUCCESSFUL;
+ return rc;
}
--
2.13.7
More information about the devel
mailing list