summaryrefslogtreecommitdiff
path: root/nuttx/drivers
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-16 23:23:46 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-16 23:23:46 +0000
commitcef4fec60cb7f31f81f887fcfd729be41662abb1 (patch)
tree0d46ddbbeaa56d21bde1660d97c4e34c31539f11 /nuttx/drivers
parent471b50c5f8f0f49ce8abfb8f0085d05cfe32edaa (diff)
downloadpx4-nuttx-cef4fec60cb7f31f81f887fcfd729be41662abb1.tar.gz
px4-nuttx-cef4fec60cb7f31f81f887fcfd729be41662abb1.tar.bz2
px4-nuttx-cef4fec60cb7f31f81f887fcfd729be41662abb1.zip
Clean-up from big switch to stdint/stdbool
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2362 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers')
-rw-r--r--nuttx/drivers/can.c4
-rw-r--r--nuttx/drivers/mmcsd/mmcsd_sdio.c6
-rwxr-xr-xnuttx/drivers/mtd/ftl.c6
-rw-r--r--nuttx/drivers/mtd/m25px.c2
4 files changed, 10 insertions, 8 deletions
diff --git a/nuttx/drivers/can.c b/nuttx/drivers/can.c
index 47525257d..3be0248dc 100644
--- a/nuttx/drivers/can.c
+++ b/nuttx/drivers/can.c
@@ -559,13 +559,13 @@ static int can_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
switch (cmd)
{
/* CANIOCTL_RTR: Send the remote transmission request and wait for the response.
- * Argument is a reference to struct canioctl_rtr_s (casting to uintptr first
+ * Argument is a reference to struct canioctl_rtr_s (casting to uintptr_t first
* eliminates complaints on some architectures where the sizeof long is different
* from the size of a pointer).
*/
case CANIOCTL_RTR:
- ret = can_rtrread(dev, (struct canioctl_rtr_s*)((uintptr)arg));
+ ret = can_rtrread(dev, (struct canioctl_rtr_s*)((uintptr_t)arg));
break;
/* Not a "built-in" ioctl command.. perhaps it is unique to this device driver */
diff --git a/nuttx/drivers/mmcsd/mmcsd_sdio.c b/nuttx/drivers/mmcsd/mmcsd_sdio.c
index 7eea71983..9d04c683b 100644
--- a/nuttx/drivers/mmcsd/mmcsd_sdio.c
+++ b/nuttx/drivers/mmcsd/mmcsd_sdio.c
@@ -218,7 +218,9 @@ static int mmcsd_ioctl(FAR struct inode *inode, int cmd,
static void mmcsd_mediachange(FAR void *arg);
static int mmcsd_widebus(FAR struct mmcsd_state_s *priv);
+#ifdef CONFIG_MMCSD_MMCSUPPORT
static int mmcsd_mmcinitialize(FAR struct mmcsd_state_s *priv);
+#endif
static int mmcsd_sdinitialize(FAR struct mmcsd_state_s *priv);
static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv);
static int mmcsd_probe(FAR struct mmcsd_state_s *priv);
@@ -2120,9 +2122,9 @@ static int mmcsd_widebus(FAR struct mmcsd_state_s *priv)
*
****************************************************************************/
+#ifdef CONFIG_MMCSD_MMCSUPPORT
static int mmcsd_mmcinitialize(FAR struct mmcsd_state_s *priv)
{
-#ifdef CONFIG_MMCSD_MMCSUPPORT
uint32_t cid[4];
uint32_t csd[4];
int ret;
@@ -2201,9 +2203,9 @@ static int mmcsd_mmcinitialize(FAR struct mmcsd_state_s *priv)
SDIO_CLOCK(priv->dev, CLOCK_MMC_TRANSFER);
up_udelay( MMCSD_CLK_DELAY);
-#endif
return OK;
}
+#endif
/****************************************************************************
* Name: mmcsd_sdinitialize
diff --git a/nuttx/drivers/mtd/ftl.c b/nuttx/drivers/mtd/ftl.c
index 1e9ab5ebd..11ed83f63 100755
--- a/nuttx/drivers/mtd/ftl.c
+++ b/nuttx/drivers/mtd/ftl.c
@@ -475,12 +475,12 @@ int ftl_initialize(int minor, uint8_t *buffer, FAR struct mtd_dev_s *mtd)
dev->mtd = mtd;
- /* Get the device geometry. (casting to uintptr first eliminates
+ /* Get the device geometry. (casting to uintptr_t first eliminates
* complaints on some architectures where the sizeof long is different
* from the size of a pointer).
*/
- ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr)&dev->geo));
+ ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&dev->geo));
if (ret < 0)
{
fdbg("MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", ret);
@@ -503,7 +503,7 @@ int ftl_initialize(int minor, uint8_t *buffer, FAR struct mtd_dev_s *mtd)
/* Get the number of R/W blocks per erase block */
dev->blkper = dev->geo.erasesize / dev->geo.blocksize;
- DEBUGASSERT(dev->blkper * dev->geo.blocksize = dev->geo.erasesize);
+ DEBUGASSERT(dev->blkper * dev->geo.blocksize == dev->geo.erasesize);
/* Configure read-ahead/write buffering */
diff --git a/nuttx/drivers/mtd/m25px.c b/nuttx/drivers/mtd/m25px.c
index 0899376d6..509b8302a 100644
--- a/nuttx/drivers/mtd/m25px.c
+++ b/nuttx/drivers/mtd/m25px.c
@@ -579,7 +579,7 @@ static int m25p_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
{
case MTDIOC_GEOMETRY:
{
- FAR struct mtd_geometry_s *geo = (FAR struct mtd_geometry_s *)((uintptr)arg);
+ FAR struct mtd_geometry_s *geo = (FAR struct mtd_geometry_s *)((uintptr_t)arg);
if (geo)
{
/* Populate the geometry structure with information need to know