Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset b7e1458 in mainline


Ignore:
Timestamp:
2017-12-06T12:49:31Z (4 years ago)
Author:
Petr Mánek <petr.manek@…>
Branches:
lfn, master
Children:
59b8639
Parents:
1814b4ae
git-author:
Petr Mánek <petr.manek@…> (2017-12-06 12:13:26)
git-committer:
Petr Mánek <petr.manek@…> (2017-12-06 12:49:31)
Message:

usbdiag: rename usbdbg to usbdiag

Files:
6 edited
6 moved

Legend:

Unmodified
Added
Removed
  • .gitignore

    r1814b4ae rb7e1458  
    238238uspace/dist/drv/test3/
    239239uspace/dist/drv/uhci/
    240 uspace/dist/drv/usbdbg/
     240uspace/dist/drv/usbdiag/
    241241uspace/dist/drv/usbflbk/
    242242uspace/dist/drv/usbhid/
     
    297297uspace/drv/bus/usb/ohci/ohci
    298298uspace/drv/bus/usb/uhci/uhci
    299 uspace/drv/bus/usb/usbdbg/usbdbg
     299uspace/drv/bus/usb/usbdiag/usbdiag
    300300uspace/drv/bus/usb/usbflbk/usbflbk
    301301uspace/drv/bus/usb/usbhub/usbhub
  • boot/arch/amd64/Makefile.inc

    r1814b4ae rb7e1458  
    4949        bus/usb/ohci \
    5050        bus/usb/uhci \
    51         bus/usb/usbdbg \
     51        bus/usb/usbdiag \
    5252        bus/usb/usbflbk \
    5353        bus/usb/usbhub \
  • boot/arch/arm32/Makefile.inc

    r1814b4ae rb7e1458  
    8383        bus/usb/ehci \
    8484        bus/usb/ohci \
    85         bus/usb/usbdbg \
     85        bus/usb/usbdiag \
    8686        bus/usb/usbflbk \
    8787        bus/usb/usbhub \
  • boot/arch/ia64/Makefile.inc

    r1814b4ae rb7e1458  
    8080        bus/usb/ohci \
    8181        bus/usb/uhci \
    82         bus/usb/usbdbg \
     82        bus/usb/usbdiag \
    8383        bus/usb/usbflbk \
    8484        bus/usb/usbhub \
  • boot/arch/ppc32/Makefile.inc

    r1814b4ae rb7e1458  
    4747        bus/pci/pciintel \
    4848        bus/usb/ohci \
    49         bus/usb/usbdbg \
     49        bus/usb/usbdiag \
    5050        bus/usb/usbflbk \
    5151        bus/usb/usbhub \
  • uspace/Makefile

    r1814b4ae rb7e1458  
    151151        drv/bus/usb/ohci \
    152152        drv/bus/usb/uhci \
    153         drv/bus/usb/usbdbg \
     153        drv/bus/usb/usbdiag \
    154154        drv/bus/usb/usbflbk \
    155155        drv/bus/usb/usbhub \
  • uspace/drv/bus/usb/usbdiag/Makefile

    r1814b4ae rb7e1458  
    3131LIBS = usbdev usb drv
    3232
    33 BINARY = usbdbg
     33BINARY = usbdiag
    3434
    3535SOURCES = \
  • uspace/drv/bus/usb/usbdiag/device.c

    r1814b4ae rb7e1458  
    2727 */
    2828
    29 /** @addtogroup drvusbdbg
     29/** @addtogroup drvusbdiag
    3030 * @{
    3131 */
     
    3939#include "device.h"
    4040
    41 #define NAME "usbdbg"
     41#define NAME "usbdiag"
    4242
    43 static int device_init(usb_dbg_dev_t *dev)
     43static int device_init(usb_diag_dev_t *dev)
    4444{
    4545        // TODO: allocate data structures, set up stuffs
     
    4848}
    4949
    50 static void device_fini(usb_dbg_dev_t *dev)
     50static void device_fini(usb_diag_dev_t *dev)
    5151{
    5252        // TODO: tear down data structures
    5353}
    5454
    55 int usb_dbg_dev_create(usb_device_t *dev, usb_dbg_dev_t **out_dbg_dev)
     55int usb_diag_dev_create(usb_device_t *dev, usb_diag_dev_t **out_diag_dev)
    5656{
    5757        assert(dev);
    58         assert(out_dbg_dev);
     58        assert(out_diag_dev);
    5959
    60         usb_dbg_dev_t *dbg_dev = usb_device_data_alloc(dev, sizeof(usb_dbg_dev_t));
    61         if (!dbg_dev)
     60        usb_diag_dev_t *diag_dev = usb_device_data_alloc(dev, sizeof(usb_diag_dev_t));
     61        if (!diag_dev)
    6262                return ENOMEM;
    6363
    64         dbg_dev->usb_dev = dev;
     64        diag_dev->usb_dev = dev;
    6565
    6666        int err;
    67         if ((err = device_init(dbg_dev)))
     67        if ((err = device_init(diag_dev)))
    6868                goto err_init;
    6969
    70         *out_dbg_dev = dbg_dev;
     70        *out_diag_dev = diag_dev;
    7171        return EOK;
    7272
     
    7676}
    7777
    78 void usb_dbg_dev_destroy(usb_dbg_dev_t *dev)
     78void usb_diag_dev_destroy(usb_diag_dev_t *dev)
    7979{
    8080        assert(dev);
  • uspace/drv/bus/usb/usbdiag/device.h

    r1814b4ae rb7e1458  
    2727 */
    2828
    29 /** @addtogroup drvusbdbg
     29/** @addtogroup drvusbdiag
    3030 * @{
    3131 */
    3232/** @file
    33  * USB debug device structures.
     33 * USB diagnostic device structures.
    3434 */
    3535
    36 #ifndef USB_DBG_DEVICE_H_
    37 #define USB_DBG_DEVICE_H_
     36#ifndef USB_DIAG_DEVICE_H_
     37#define USB_DIAG_DEVICE_H_
    3838
    3939#include <usb/dev/device.h>
     
    4242 * USB debug device.
    4343 */
    44 typedef struct usb_dbg_dev {
     44typedef struct usb_diag_dev {
    4545        usb_device_t *usb_dev;
    46 } usb_dbg_dev_t;
     46} usb_diag_dev_t;
    4747
    48 int usb_dbg_dev_create(usb_device_t *, usb_dbg_dev_t **);
    49 void usb_dbg_dev_destroy(usb_dbg_dev_t *);
     48int usb_diag_dev_create(usb_device_t *, usb_diag_dev_t **);
     49void usb_diag_dev_destroy(usb_diag_dev_t *);
    5050
    51 static inline usb_dbg_dev_t * usb_dbg_dev_get(usb_device_t *usb_dev)
     51static inline usb_diag_dev_t * usb_diag_dev_get(usb_device_t *usb_dev)
    5252{
    5353        assert(usb_dev);
     
    5555}
    5656
    57 #endif /* USB_DBG_USBDBG_H_ */
     57#endif /* USB_DIAG_USBDIAG_H_ */
    5858
    5959/**
  • uspace/drv/bus/usb/usbdiag/main.c

    r1814b4ae rb7e1458  
    2727 */
    2828
    29 /** @addtogroup drvusbdbg
     29/** @addtogroup drvusbdiag
    3030 * @{
    3131 */
     
    3838#include <usb/dev/driver.h>
    3939
    40 #include "usbdbg.h"
     40#include "usbdiag.h"
    4141#include "device.h"
    4242
    43 #define NAME "usbdbg"
     43#define NAME "usbdiag"
    4444
    4545static int device_add(usb_device_t *dev)
     
    4949        int err;
    5050
    51         usb_dbg_dev_t *dbg_dev;
    52         if ((err = usb_dbg_dev_create(dev, &dbg_dev)))
     51        usb_diag_dev_t *diag_dev;
     52        if ((err = usb_diag_dev_create(dev, &diag_dev)))
    5353                return err;
    5454
     
    6363        usb_log_info("Removing device '%s'", usb_device_get_name(dev));
    6464
    65         usb_dbg_dev_t *dbg_dev = usb_dbg_dev_get(dev);
     65        usb_diag_dev_t *diag_dev = usb_diag_dev_get(dev);
    6666
    6767        /* TODO: Make sure nothing is going on with the device. */
     
    6969        /* TODO: Remove device from list */
    7070
    71         usb_dbg_dev_destroy(dbg_dev);
     71        usb_diag_dev_destroy(diag_dev);
    7272
    7373        return EOK;
     
    7878        usb_log_info("Device '%s' gone.", usb_device_get_name(dev));
    7979
    80         usb_dbg_dev_t *dbg_dev = usb_dbg_dev_get(dev);
     80        usb_diag_dev_t *diag_dev = usb_diag_dev_get(dev);
    8181
    8282        /* TODO: Make sure nothing is going on with the device. */
     
    8484        /* TODO: Remove device from list */
    8585
    86         usb_dbg_dev_destroy(dbg_dev);
     86        usb_diag_dev_destroy(diag_dev);
    8787
    8888        return EOK;
     
    100100
    101101/** USB debug driver ops. */
    102 static const usb_driver_ops_t dbg_driver_ops = {
     102static const usb_driver_ops_t diag_driver_ops = {
    103103        .device_add = device_add,
    104104        .device_rem = device_remove,
     
    109109
    110110/** USB debug driver. */
    111 static const usb_driver_t dbg_driver = {
     111static const usb_driver_t diag_driver = {
    112112        .name = NAME,
    113         .ops = &dbg_driver_ops,
     113        .ops = &diag_driver_ops,
    114114        .endpoints = NULL
    115115};
     
    121121        log_init(NAME);
    122122
    123         return usb_driver_main(&dbg_driver);
     123        return usb_driver_main(&diag_driver);
    124124}
    125125
  • uspace/drv/bus/usb/usbdiag/usbdiag.h

    r1814b4ae rb7e1458  
    2727 */
    2828
    29 /** @addtogroup drvusbdbg
     29/** @addtogroup drvusbdiag
    3030 * @{
    3131 */
    3232/** @file
    33  * USB debug device driver API.
     33 * USB diagnostic device driver API.
    3434 */
    3535
    36 #ifndef USB_DBG_USBDBG_H_
    37 #define USB_DBG_USBDBG_H_
     36#ifndef USB_DIAG_USBDIAG_H_
     37#define USB_DIAG_USBDIAG_H_
    3838
    3939// TODO: Add some API.
    4040
    41 #endif /* USB_DBG_USBDBG_H_ */
     41#endif /* USB_DIAG_USBDIAG_H_ */
    4242
    4343/**
Note: See TracChangeset for help on using the changeset viewer.