From 919877191d62d76e859f143f0784c53cc362adb3 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 15 Jul 2017 08:20:02 -0600 Subject: [PATCH] Composite setup: Remove useless board_cdc* wrapper. --- .../mcu123-lpc214x/src/lpc2148_composite.c | 55 ++----------------- configs/olimexino-stm32/src/stm32_composite.c | 53 +----------------- configs/samv71-xult/src/sam_composite.c | 53 +----------------- configs/spark/src/stm32_composite.c | 53 +----------------- configs/stm3210e-eval/src/stm32_composite.c | 53 +----------------- 5 files changed, 16 insertions(+), 251 deletions(-) diff --git a/configs/mcu123-lpc214x/src/lpc2148_composite.c b/configs/mcu123-lpc214x/src/lpc2148_composite.c index 997c3c5c8a..582006850f 100644 --- a/configs/mcu123-lpc214x/src/lpc2148_composite.c +++ b/configs/mcu123-lpc214x/src/lpc2148_composite.c @@ -74,53 +74,6 @@ * Private Functions ****************************************************************************/ -/**************************************************************************** - * Name: board_cdcclassobject - * - * Description: - * If the CDC serial class driver is part of composite device, then - * board-specific logic must provide board_cdcclassobject(). In the - * simplest case, board_cdcclassobject() is simply a wrapper around - * cdcacm_classobject() that provides the correct device minor number. - * - * Input Parameters: - * classdev - The location to return the CDC serial class' device - * instance. - * - * Returned Value: - * 0 on success; a negated errno on failure - * - ****************************************************************************/ - -static int board_cdcclassobject(int minor, - FAR struct usbdev_description_s *devdesc, - FAR struct usbdevclass_driver_s **classdev) -{ - return cdcacm_classobject(minor, devdesc, classdev); -} - -/**************************************************************************** - * Name: board_cdcuninitialize - * - * Description: - * Un-initialize the USB serial class driver. This is just an application- - * specific wrapper around cdcadm_unitialize() that is called form the - * composite device logic. - * - * Input Parameters: - * classdev - The class driver instance previously given to the composite - * driver by board_cdcclassobject(). - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void board_cdcuninitialize(FAR struct usbdevclass_driver_s *classdev) -{ - cdcacm_uninitialize(classdev); -} - /************************************************************************************ * Name: board_mscclassobject * @@ -133,7 +86,7 @@ static void board_cdcuninitialize(FAR struct usbdevclass_driver_s *classdev) * board_mscclassobject() is called from the composite driver. It must * encapsulate the instantiation and configuration of the mass storage * class and the return the mass storage device's class driver instance - * to the composite dirver. + * to the composite driver. * * Input Parameters: * classdev - The location to return the mass storage class' device @@ -159,7 +112,7 @@ static int board_mscclassobject(int minor, FAR struct usbdev_description_s *devd return ret; } - /************************************************************************************ +/************************************************************************************ * Name: board_mscuninitialize * * Description: @@ -285,8 +238,8 @@ FAR void *board_composite_connect(int port, int configid) /* Overwrite and correct some values... */ /* The callback functions for the CDC/ACM class */ - dev[0].classobject = board_cdcclassobject; - dev[0].uninitialize = board_cdcuninitialize; + dev[0].classobject = cdcacm_classobject; + dev[0].uninitialize = cdcacm_uninitialize; /* Interfaces */ diff --git a/configs/olimexino-stm32/src/stm32_composite.c b/configs/olimexino-stm32/src/stm32_composite.c index f0e673321c..31dbf2e19b 100644 --- a/configs/olimexino-stm32/src/stm32_composite.c +++ b/configs/olimexino-stm32/src/stm32_composite.c @@ -85,53 +85,6 @@ * Private Functions ****************************************************************************/ -/**************************************************************************** - * Name: board_cdcclassobject - * - * Description: - * If the CDC serial class driver is part of composite device, then - * board-specific logic must provide board_cdcclassobject(). In the - * simplest case, board_cdcclassobject() is simply a wrapper around - * cdcacm_classobject() that provides the correct device minor number. - * - * Input Parameters: - * classdev - The location to return the CDC serial class' device - * instance. - * - * Returned Value: - * 0 on success; a negated errno on failure - * - ****************************************************************************/ - -static int board_cdcclassobject(int minor, - FAR struct usbdev_description_s *devdesc, - FAR struct usbdevclass_driver_s **classdev) -{ - return cdcacm_classobject(minor, devdesc, classdev); -} - -/**************************************************************************** - * Name: board_cdcuninitialize - * - * Description: - * Un-initialize the USB serial class driver. This is just an application- - * specific wrapper around cdcadm_unitialize() that is called form the - * composite device logic. - * - * Input Parameters: - * classdev - The class driver instance previously given to the composite - * driver by board_cdcclassobject(). - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void board_cdcuninitialize(FAR struct usbdevclass_driver_s *classdev) -{ - cdcacm_uninitialize(classdev); -} - /************************************************************************************ * Name: board_mscclassobject * @@ -144,7 +97,7 @@ static void board_cdcuninitialize(FAR struct usbdevclass_driver_s *classdev) * board_mscclassobject() is called from the composite driver. It must * encapsulate the instantiation and configuration of the mass storage * class and the return the mass storage device's class driver instance - * to the composite dirver. + * to the composite driver. * * Input Parameters: * classdev - The location to return the mass storage class' device @@ -291,8 +244,8 @@ FAR void *board_composite_connect(int port, int configid) /* Overwrite and correct some values... */ /* The callback functions for the CDC/ACM class */ - dev[0].classobject = board_cdcclassobject; - dev[0].uninitialize = board_cdcuninitialize; + dev[0].classobject = cdcacm_classobject; + dev[0].uninitialize = cdcacm_uninitialize; /* Interfaces */ diff --git a/configs/samv71-xult/src/sam_composite.c b/configs/samv71-xult/src/sam_composite.c index fbebe458a8..e6f1ebfe81 100644 --- a/configs/samv71-xult/src/sam_composite.c +++ b/configs/samv71-xult/src/sam_composite.c @@ -53,53 +53,6 @@ * Private Functions ****************************************************************************/ -/**************************************************************************** - * Name: board_cdcclassobject - * - * Description: - * If the CDC serial class driver is part of composite device, then - * board-specific logic must provide board_cdcclassobject(). In the - * simplest case, board_cdcclassobject() is simply a wrapper around - * cdcacm_classobject() that provides the correct device minor number. - * - * Input Parameters: - * classdev - The location to return the CDC serial class' device - * instance. - * - * Returned Value: - * 0 on success; a negated errno on failure - * - ****************************************************************************/ - -static int board_cdcclassobject(int minor, - FAR struct usbdev_description_s *devdesc, - FAR struct usbdevclass_driver_s **classdev) -{ - return cdcacm_classobject(minor, devdesc, classdev); -} - -/**************************************************************************** - * Name: board_cdcuninitialize - * - * Description: - * Un-initialize the USB serial class driver. This is just an application- - * specific wrapper around cdcadm_unitialize() that is called form the - * composite device logic. - * - * Input Parameters: - * classdev - The class driver instance previously given to the composite - * driver by board_cdcclassobject(). - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void board_cdcuninitialize(FAR struct usbdevclass_driver_s *classdev) -{ - cdcacm_uninitialize(classdev); -} - /************************************************************************************ * Name: board_mscclassobject * @@ -112,7 +65,7 @@ static void board_cdcuninitialize(FAR struct usbdevclass_driver_s *classdev) * board_mscclassobject() is called from the composite driver. It must * encapsulate the instantiation and configuration of the mass storage * class and the return the mass storage device's class driver instance - * to the composite dirver. + * to the composite driver. * * Input Parameters: * classdev - The location to return the mass storage class' device @@ -219,8 +172,8 @@ FAR void *board_composite_connect(int port, int configid) /* Overwrite and correct some values... */ /* The callback functions for the CDC/ACM class */ - dev[0].classobject = board_cdcclassobject; - dev[0].uninitialize = board_cdcuninitialize; + dev[0].classobject = cdcacm_classobject; + dev[0].uninitialize = cdcacm_uninitialize; /* Interfaces */ diff --git a/configs/spark/src/stm32_composite.c b/configs/spark/src/stm32_composite.c index 3e291bc9a3..eb62d01b61 100644 --- a/configs/spark/src/stm32_composite.c +++ b/configs/spark/src/stm32_composite.c @@ -285,53 +285,6 @@ static int stm32_composite_initialize(void) } #endif -/**************************************************************************** - * Name: board_cdcclassobject - * - * Description: - * If the CDC serial class driver is part of composite device, then - * board-specific logic must provide board_cdcclassobject(). In the - * simplest case, board_cdcclassobject() is simply a wrapper around - * cdcacm_classobject() that provides the correct device minor number. - * - * Input Parameters: - * classdev - The location to return the CDC serial class' device - * instance. - * - * Returned Value: - * 0 on success; a negated errno on failure - * - ****************************************************************************/ - -static int board_cdcclassobject(int minor, - FAR struct usbdev_description_s *devdesc, - FAR struct usbdevclass_driver_s **classdev) -{ - return cdcacm_classobject(minor, devdesc, classdev); -} - -/**************************************************************************** - * Name: board_cdcuninitialize - * - * Description: - * Un-initialize the USB serial class driver. This is just an application- - * specific wrapper around cdcadm_unitialize() that is called form the - * composite device logic. - * - * Input Parameters: - * classdev - The class driver instance previously given to the composite - * driver by board_cdcclassobject(). - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void board_cdcuninitialize(FAR struct usbdevclass_driver_s *classdev) -{ - cdcacm_uninitialize(classdev); -} - /************************************************************************************ * Name: board_mscclassobject * @@ -344,7 +297,7 @@ static void board_cdcuninitialize(FAR struct usbdevclass_driver_s *classdev) * board_mscclassobject() is called from the composite driver. It must * encapsulate the instantiation and configuration of the mass storage * class and the return the mass storage device's class driver instance - * to the composite dirver. + * to the composite driver. * * Input Parameters: * classdev - The location to return the mass storage class' device @@ -453,8 +406,8 @@ FAR void *board_composite_connect(int port, int configid) /* Overwrite and correct some values... */ /* The callback functions for the CDC/ACM class */ - dev[0].classobject = board_cdcclassobject; - dev[0].uninitialize = board_cdcuninitialize; + dev[0].classobject = cdcacm_classobject; + dev[0].uninitialize = cdcacm_uninitialize; /* Interfaces */ diff --git a/configs/stm3210e-eval/src/stm32_composite.c b/configs/stm3210e-eval/src/stm32_composite.c index f5e2f6805f..1c2f39b26d 100644 --- a/configs/stm3210e-eval/src/stm32_composite.c +++ b/configs/stm3210e-eval/src/stm32_composite.c @@ -83,53 +83,6 @@ * Private Functions ****************************************************************************/ -/**************************************************************************** - * Name: board_cdcclassobject - * - * Description: - * If the CDC serial class driver is part of composite device, then - * board-specific logic must provide board_cdcclassobject(). In the - * simplest case, board_cdcclassobject() is simply a wrapper around - * cdcacm_classobject() that provides the correct device minor number. - * - * Input Parameters: - * classdev - The location to return the CDC serial class' device - * instance. - * - * Returned Value: - * 0 on success; a negated errno on failure - * - ****************************************************************************/ - -static int board_cdcclassobject(int minor, - FAR struct usbdev_description_s *devdesc, - FAR struct usbdevclass_driver_s **classdev) -{ - return cdcacm_classobject(minor, devdesc, classdev); -} - -/**************************************************************************** - * Name: board_cdcuninitialize - * - * Description: - * Un-initialize the USB serial class driver. This is just an application- - * specific wrapper around cdcadm_unitialize() that is called form the - * composite device logic. - * - * Input Parameters: - * classdev - The class driver instance previously given to the composite - * driver by board_cdcclassobject(). - * - * Returned Value: - * None - * - ****************************************************************************/ - -static void board_cdcuninitialize(FAR struct usbdevclass_driver_s *classdev) -{ - cdcacm_uninitialize(classdev); -} - /************************************************************************************ * Name: board_mscclassobject * @@ -142,7 +95,7 @@ static void board_cdcuninitialize(FAR struct usbdevclass_driver_s *classdev) * board_mscclassobject() is called from the composite driver. It must * encapsulate the instantiation and configuration of the mass storage * class and the return the mass storage device's class driver instance - * to the composite dirver. + * to the composite driver. * * Input Parameters: * classdev - The location to return the mass storage class' device @@ -296,8 +249,8 @@ FAR void *board_composite_connect(int port, int configid) /* Overwrite and correct some values... */ /* The callback functions for the CDC/ACM class */ - dev[0].classobject = board_cdcclassobject; - dev[0].uninitialize = board_cdcuninitialize; + dev[0].classobject = cdcacm_classobject; + dev[0].uninitialize = cdcacm_uninitialize; /* Interfaces */