summaryrefslogtreecommitdiff
path: root/nuttx/drivers/mtd/skeleton.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-24 17:35:16 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-24 17:35:16 +0000
commit9aa229270fa7eb834950b6648bbe077fc8fecb62 (patch)
tree5a875a7d8cbdcf777ade0ed9e1675e8cbea135b1 /nuttx/drivers/mtd/skeleton.c
parentefd389f792aff35cb90b8b85b21eb5f7ff45fc63 (diff)
downloadpx4-nuttx-9aa229270fa7eb834950b6648bbe077fc8fecb62.tar.gz
px4-nuttx-9aa229270fa7eb834950b6648bbe077fc8fecb62.tar.bz2
px4-nuttx-9aa229270fa7eb834950b6648bbe077fc8fecb62.zip
Add a RAM-based MTD device
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3532 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/mtd/skeleton.c')
-rw-r--r--nuttx/drivers/mtd/skeleton.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/nuttx/drivers/mtd/skeleton.c b/nuttx/drivers/mtd/skeleton.c
index ecd5f85bb..8b09b5c15 100644
--- a/nuttx/drivers/mtd/skeleton.c
+++ b/nuttx/drivers/mtd/skeleton.c
@@ -198,7 +198,7 @@ static int skel_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
case MTDIOC_GEOMETRY:
{
FAR struct mtd_geometry_s *geo = (FARstruct mtd_geometry_s *)arg;
- if (ppv)
+ if (geo)
{
/* Populate the geometry structure with information need to know
* the capacity and how to access the device.
@@ -234,7 +234,7 @@ static int skel_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
}
break;
- case MTDIOC_BULKERASE
+ case MTDIOC_BULKERASE:
{
/* Erase the entire device */
@@ -258,9 +258,10 @@ static int skel_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
* Name: skel_initialize
*
* Description:
- * Create an initialize MTD device instance. MTD devices are not registered
- * in the file system, but are created as instances that can be bound to
- * other functions (such as a block or character driver front end).
+ * Create and initialize an MTD device instance. MTD devices are not
+ * registered in the file system, but are created as instances that can
+ * be bound to other functions (such as a block or character driver front
+ * end).
*
****************************************************************************/