summaryrefslogtreecommitdiff
path: root/nuttx/drivers/usbhost/usbhost_hidmouse.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/drivers/usbhost/usbhost_hidmouse.c')
-rw-r--r--nuttx/drivers/usbhost/usbhost_hidmouse.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/nuttx/drivers/usbhost/usbhost_hidmouse.c b/nuttx/drivers/usbhost/usbhost_hidmouse.c
index d79d94fd0..8e648bf16 100644
--- a/nuttx/drivers/usbhost/usbhost_hidmouse.c
+++ b/nuttx/drivers/usbhost/usbhost_hidmouse.c
@@ -253,7 +253,7 @@ struct usbhost_state_s
{
/* This is the externally visible portion of the state */
- struct usbhost_class_s class;
+ struct usbhost_class_s usbclass;
/* This is an instance of the USB host driver bound to this class instance */
@@ -320,7 +320,7 @@ static void usbhost_pollnotify(FAR struct usbhost_state_s *dev);
/* Memory allocation services */
static inline FAR struct usbhost_state_s *usbhost_allocclass(void);
-static inline void usbhost_freeclass(FAR struct usbhost_state_s *class);
+static inline void usbhost_freeclass(FAR struct usbhost_state_s *usbclass);
/* Device name management */
@@ -374,10 +374,10 @@ static struct usbhost_class_s *usbhost_create(FAR struct usbhost_driver_s *drvr,
/* struct usbhost_class_s methods */
-static int usbhost_connect(FAR struct usbhost_class_s *class,
+static int usbhost_connect(FAR struct usbhost_class_s *usbclass,
FAR const uint8_t *configdesc, int desclen,
uint8_t funcaddr);
-static int usbhost_disconnected(FAR struct usbhost_class_s *class);
+static int usbhost_disconnected(FAR struct usbhost_class_s *usbclass);
/* Driver methods. We export the mouse as a standard character driver */
@@ -531,21 +531,21 @@ static inline FAR struct usbhost_state_s *usbhost_allocclass(void)
* Free a class instance previously allocated by usbhost_allocclass().
*
* Input Parameters:
- * class - A reference to the class instance to be freed.
+ * usbclass - A reference to the class instance to be freed.
*
* Returned Values:
* None
*
****************************************************************************/
-static inline void usbhost_freeclass(FAR struct usbhost_state_s *class)
+static inline void usbhost_freeclass(FAR struct usbhost_state_s *usbclass)
{
- DEBUGASSERT(class != NULL);
+ DEBUGASSERT(usbclass != NULL);
/* Free the class instance. */
- uvdbg("Freeing: %p\n", class);;
- kmm_free(class);
+ uvdbg("Freeing: %p\n", usbclass);;
+ kmm_free(usbclass);
}
/****************************************************************************
@@ -1874,14 +1874,14 @@ static FAR struct usbhost_class_s *
{
/* Initialize class method function pointers */
- priv->class.connect = usbhost_connect;
- priv->class.disconnected = usbhost_disconnected;
+ priv->usbclass.connect = usbhost_connect;
+ priv->usbclass.disconnected = usbhost_disconnected;
/* The initial reference count is 1... One reference is held by
* the driver.
*/
- priv->crefs = 1;
+ priv->crefs = 1;
/* Initialize semaphores */
@@ -1890,11 +1890,11 @@ static FAR struct usbhost_class_s *
/* Bind the driver to the storage class instance */
- priv->drvr = drvr;
+ priv->drvr = drvr;
/* Return the instance of the USB mouse class driver */
- return &priv->class;
+ return &priv->usbclass;
}
}
@@ -1921,7 +1921,8 @@ static FAR struct usbhost_class_s *
* descriptor to the class so that the class may initialize properly
*
* Input Parameters:
- * class - The USB host class entry previously obtained from a call to create().
+ * usbclass - The USB host class entry previously obtained from a call to
+ * create().
* configdesc - A pointer to a uint8_t buffer container the configuration
* descriptor.
* desclen - The length in bytes of the configuration descriptor.
@@ -1943,11 +1944,11 @@ static FAR struct usbhost_class_s *
*
****************************************************************************/
-static int usbhost_connect(FAR struct usbhost_class_s *class,
+static int usbhost_connect(FAR struct usbhost_class_s *usbclass,
FAR const uint8_t *configdesc, int desclen,
uint8_t funcaddr)
{
- FAR struct usbhost_state_s *priv = (FAR struct usbhost_state_s *)class;
+ FAR struct usbhost_state_s *priv = (FAR struct usbhost_state_s *)usbclass;
int ret;
DEBUGASSERT(priv != NULL &&
@@ -1995,7 +1996,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *class,
* been disconnected.
*
* Input Parameters:
- * class - The USB host class entry previously obtained from a call to
+ * usbclass - The USB host class entry previously obtained from a call to
* create().
*
* Returned Values:
@@ -2007,9 +2008,9 @@ static int usbhost_connect(FAR struct usbhost_class_s *class,
*
****************************************************************************/
-static int usbhost_disconnected(struct usbhost_class_s *class)
+static int usbhost_disconnected(struct usbhost_class_s *usbclass)
{
- FAR struct usbhost_state_s *priv = (FAR struct usbhost_state_s *)class;
+ FAR struct usbhost_state_s *priv = (FAR struct usbhost_state_s *)usbclass;
int i;
DEBUGASSERT(priv != NULL);