[rtems commit] bsp/smdk2410: Use rtems_blkdev_create()
Sebastian Huber
sebh at rtems.org
Tue Aug 7 05:40:57 UTC 2018
Module: rtems
Branch: master
Commit: d279e747a7ef8291bf76441b23f8243d418a6e83
Changeset: http://git.rtems.org/rtems/commit/?id=d279e747a7ef8291bf76441b23f8243d418a6e83
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Aug 1 06:14:14 2018 +0200
bsp/smdk2410: Use rtems_blkdev_create()
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 8291008..cd48c40 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, NULL);
- return RTEMS_SUCCESSFUL;
+ return rc;
}
More information about the vc
mailing list