From 4d25119e6212c4aabe788016c790f9dbf4ed9613 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 6 Apr 2014 09:02:02 -0600 Subject: [PATCH] Fix various typos in comments. From Alan Carvalho de Assis --- drivers/can.c | 8 ++++---- drivers/lcd/ssd1289.c | 2 +- drivers/pwm.c | 10 +++++----- drivers/ramdisk.c | 4 ++-- drivers/rwbuffer.c | 2 +- drivers/sensors/qencoder.c | 2 +- drivers/usbdev/cdcacm.c | 2 ++ drivers/watchdog.c | 6 +++--- 8 files changed, 19 insertions(+), 17 deletions(-) diff --git a/drivers/can.c b/drivers/can.c index 2c15677812..a0a3857d05 100644 --- a/drivers/can.c +++ b/drivers/can.c @@ -143,7 +143,7 @@ static int can_open(FAR struct file *filep) } else { - /* Increment the count of references to the device. If this the first + /* Increment the count of references to the device. If this is the first * time that the driver has been opened for this device, then initialize * the device. */ @@ -453,9 +453,9 @@ static ssize_t can_write(FAR struct file *filep, FAR const char *buffer, size_t flags = irqsave(); - /* Check if the TX is inactive when we started. In certain race conditionas, there - * may be a pending interrupt to kick things back off, but we will here that there - * is not. That the hardware is IDLE and will need to be kick-started. + /* Check if the TX is inactive when we started. In certain race conditions, there + * may be a pending interrupt to kick things back off, but we will be sure here that + * there is not. That the hardware is IDLE and will need to be kick-started. */ inactive = dev_txempty(dev); diff --git a/drivers/lcd/ssd1289.c b/drivers/lcd/ssd1289.c index 3a587818bc..5171cbd996 100644 --- a/drivers/lcd/ssd1289.c +++ b/drivers/lcd/ssd1289.c @@ -2,7 +2,7 @@ * drivers/lcd/ssd1289.c * * Generic LCD driver for LCDs based on the Solomon Systech SSD1289 LCD controller. - * Think of this as a template for an LCD driver that you will proably ahve to + * Think of this as a template for an LCD driver that you will probably have to * customize for any particular LCD hardware. * * Copyright (C) 2012 Gregory Nutt. All rights reserved. diff --git a/drivers/pwm.c b/drivers/pwm.c index 6e33c902bf..dfbb9b981b 100644 --- a/drivers/pwm.c +++ b/drivers/pwm.c @@ -266,7 +266,7 @@ errout: * Name: pwm_read * * Description: - * A dummy read method. This is provided only to satsify the VFS layer. + * A dummy read method. This is provided only to satisfy the VFS layer. * ************************************************************************************/ @@ -281,7 +281,7 @@ static ssize_t pwm_read(FAR struct file *filep, FAR char *buffer, size_t buflen) * Name: pwm_write * * Description: - * A dummy write method. This is provided only to satsify the VFS layer. + * A dummy write method. This is provided only to satisfy the VFS layer. * ************************************************************************************/ @@ -469,7 +469,7 @@ static int pwm_ioctl(FAR struct file *filep, int cmd, unsigned long arg) /* PWMIOC_GETCHARACTERISTICS - Get the currently selected characteristics of * the pulsed output (independent of whether the output is start or stopped). * - * ioctl argument: A reference to struct pwm_info_s to recevie the + * ioctl argument: A reference to struct pwm_info_s to receive the * characteristics of the pulsed output. */ @@ -569,7 +569,7 @@ static int pwm_ioctl(FAR struct file *filep, int cmd, unsigned long arg) * reset state (as if the shutdown() method had already been called). * * Input parameters: - * path - The full path to the driver to be registers in the NuttX pseudo- + * path - The full path to the driver to be registered in the NuttX pseudo- * filesystem. The recommended convention is to name all PWM drivers * as "/dev/pwm0", "/dev/pwm1", etc. where the driver path differs only * in the "minor" number at the end of the device name. @@ -622,7 +622,7 @@ int pwm_register(FAR const char *path, FAR struct pwm_lowerhalf_s *dev) * number of pulses is required, the 'count' value will be nonzero. * 2. The lower half driver's start() methoc must verify that it can * support the request pulse train (frequency, duty, AND pulse count). - * It it cannot, it should return an error. If the pulse count is + * If it cannot, it should return an error. If the pulse count is * non-zero, it should set up the hardware for that number of pulses * and return success. NOTE: That is CONFIG_PWM_PULSECOUNT is * defined, the start() method receives an additional parameter diff --git a/drivers/ramdisk.c b/drivers/ramdisk.c index 008d60ff2d..436a33f2c1 100644 --- a/drivers/ramdisk.c +++ b/drivers/ramdisk.c @@ -139,7 +139,7 @@ static int rd_close(FAR struct inode *inode) /**************************************************************************** * Name: rd_read * - * Description: Read the specified numer of sectors + * Description: Read the specified number of sectors * ****************************************************************************/ @@ -329,7 +329,7 @@ int romdisk_register(int minor, uint8_t *buffer, uint32_t nsectors, snprintf(devname, 16, "/dev/ram%d", minor); - /* Inode private data is a reference to the ramdisk device stgructure */ + /* Inode private data is a reference to the ramdisk device structure */ ret = register_blockdriver(devname, &g_bops, 0, dev); if (ret < 0) diff --git a/drivers/rwbuffer.c b/drivers/rwbuffer.c index c085fd381f..b0505bf382 100644 --- a/drivers/rwbuffer.c +++ b/drivers/rwbuffer.c @@ -194,7 +194,7 @@ static void rwb_wrtimeout(FAR void *arg) FAR struct rwbuffer_s *rwb = (struct rwbuffer_s *)arg; DEBUGASSERT(rwb != NULL); - /* If a timeout elpases with with write buffer activity, this watchdog + /* If a timeout elapses with with write buffer activity, this watchdog * handler function will be evoked on the thread of execution of the * worker thread. */ diff --git a/drivers/sensors/qencoder.c b/drivers/sensors/qencoder.c index d9f3d76255..68c5564523 100644 --- a/drivers/sensors/qencoder.c +++ b/drivers/sensors/qencoder.c @@ -86,7 +86,7 @@ * Private Type Definitions ****************************************************************************/ -/* This structure describes the state of the upper half drivere */ +/* This structure describes the state of the upper half driver */ struct qe_upperhalf_s { diff --git a/drivers/usbdev/cdcacm.c b/drivers/usbdev/cdcacm.c index 153109cbcd..df66011d91 100644 --- a/drivers/usbdev/cdcacm.c +++ b/drivers/usbdev/cdcacm.c @@ -1467,6 +1467,7 @@ static int cdcacm_setup(FAR struct usbdevclass_driver_s *driver, { memcpy(&priv->linecoding, dataout, SIZEOF_CDC_LINECODING); } + ret = 0; /* If there is a registered callback to receive line status info, then @@ -1579,6 +1580,7 @@ static int cdcacm_setup(FAR struct usbdevclass_driver_s *driver, cdcacm_ep0incomplete(dev->ep0, ctrlreq); } } + return ret; } diff --git a/drivers/watchdog.c b/drivers/watchdog.c index 4f73574443..e3c09e6716 100644 --- a/drivers/watchdog.c +++ b/drivers/watchdog.c @@ -222,7 +222,7 @@ errout: * Name: wdog_read * * Description: - * A dummy read method. This is provided only to satsify the VFS layer. + * A dummy read method. This is provided only to satisfy the VFS layer. * ************************************************************************************/ @@ -237,7 +237,7 @@ static ssize_t wdog_read(FAR struct file *filep, FAR char *buffer, size_t buflen * Name: wdog_write * * Description: - * A dummy write method. This is provided only to satsify the VFS layer. + * A dummy write method. This is provided only to satisfy the VFS layer. * ************************************************************************************/ @@ -306,7 +306,7 @@ static int wdog_ioctl(FAR struct file *filep, int cmd, unsigned long arg) break; /* cmd: WDIOC_GETSTATUS - * Description: et the status of the watchdog timer. + * Description: Get the status of the watchdog timer. * Argument: A writeable pointer to struct watchdog_status_s. */