Browse Source

fix resources linklist init error

crypto_algorithm
Liu_Weichao 9 months ago
parent
commit
4ff72f080c
  1. 2
      resources/can/dev_can.c
  2. 2
      resources/i2c/dev_i2c.c
  3. 6
      resources/pin/dev_pin.c
  4. 6
      resources/pin/drv_pin.c
  5. 2
      resources/rtc/dev_rtc.c
  6. 6
      resources/sdio/dev_sdio.c
  7. 6
      resources/sdio/drv_sdio.c
  8. 2
      resources/serial/dev_serial.c
  9. 2
      resources/spi/dev_spi.c
  10. 2
      resources/timer/dev_hwtimer.c
  11. 2
      resources/usb/dev_usb.c
  12. 6
      resources/watchdog/dev_wdt.c
  13. 6
      resources/watchdog/drv_wdt.c

2
resources/can/dev_can.c

@ -59,7 +59,7 @@ int CanDeviceRegister(struct CanHardwareDevice *can_device, void *can_param, con
x_err_t ret = EOK;
static x_bool dev_link_flag = RET_FALSE;
if (dev_link_flag) {
if (!dev_link_flag) {
CanDeviceLinkInit();
dev_link_flag = RET_TRUE;
}

2
resources/i2c/dev_i2c.c

@ -103,7 +103,7 @@ int I2cDeviceRegister(struct I2cHardwareDevice *i2c_device, void *i2c_param, con
x_err_t ret = EOK;
static x_bool dev_link_flag = RET_FALSE;
if (dev_link_flag) {
if (!dev_link_flag) {
I2cDeviceLinkInit();
dev_link_flag = RET_TRUE;
}

6
resources/pin/dev_pin.c

@ -55,11 +55,11 @@ int PinDeviceRegister(struct PinHardwareDevice *pin_device, void *pin_param, con
NULL_PARAM_CHECK(device_name);
x_err_t ret = EOK;
static x_bool DevLinkFlag = RET_FALSE;
static x_bool dev_link_flag = RET_FALSE;
if (DevLinkFlag) {
if (!dev_link_flag) {
PinDeviceLinkInit();
DevLinkFlag = RET_TRUE;
dev_link_flag = RET_TRUE;
}
if (DEV_INSTALL != pin_device->haldev.dev_state) {

6
resources/pin/drv_pin.c

@ -54,11 +54,11 @@ int PinDriverRegister(struct Driver *driver)
NULL_PARAM_CHECK(driver);
x_err_t ret = EOK;
static x_bool DriverLinkFlag = RET_FALSE;
static x_bool driver_link_flag = RET_FALSE;
if (!DriverLinkFlag) {
if (!driver_link_flag) {
PinDrvLinkInit();
DriverLinkFlag = RET_TRUE;
driver_link_flag = RET_TRUE;
}
DoubleLinkListInsertNodeAfter(&pindrv_linklist, &(driver->driver_link));

2
resources/rtc/dev_rtc.c

@ -57,7 +57,7 @@ int RtcDeviceRegister(struct RtcHardwareDevice *rtc_device, void *rtc_param, con
x_err_t ret = EOK;
static x_bool dev_link_flag = RET_FALSE;
if (dev_link_flag) {
if (!dev_link_flag) {
RtcDeviceLinkInit();
dev_link_flag = RET_TRUE;
}

6
resources/sdio/dev_sdio.c

@ -55,11 +55,11 @@ int SdioDeviceRegister(struct SdioHardwareDevice *sdio_device, const char *devic
NULL_PARAM_CHECK(device_name);
x_err_t ret = EOK;
static x_bool DevLinkFlag = RET_FALSE;
static x_bool dev_link_flag = RET_FALSE;
if (DevLinkFlag) {
if (!dev_link_flag) {
SdioDeviceLinkInit();
DevLinkFlag = RET_TRUE;
dev_link_flag = RET_TRUE;
}
if (DEV_INSTALL != sdio_device->haldev.dev_state) {

6
resources/sdio/drv_sdio.c

@ -54,11 +54,11 @@ int SdioDriverRegister(struct Driver *driver)
NULL_PARAM_CHECK(driver);
x_err_t ret = EOK;
static x_bool DriverLinkFlag = RET_FALSE;
static x_bool driver_link_flag = RET_FALSE;
if (!DriverLinkFlag) {
if (!driver_link_flag) {
SdioDrvLinkInit();
DriverLinkFlag = RET_TRUE;
driver_link_flag = RET_TRUE;
}
DoubleLinkListInsertNodeAfter(&sdiodrv_linklist, &(driver->driver_link));

2
resources/serial/dev_serial.c

@ -812,7 +812,7 @@ int SerialDeviceRegister(struct SerialHardwareDevice *serial_device, void *seria
x_err_t ret = EOK;
static x_bool dev_link_flag = RET_FALSE;
if (dev_link_flag) {
if (!dev_link_flag) {
SerialDeviceLinkInit();
dev_link_flag = RET_TRUE;
}

2
resources/spi/dev_spi.c

@ -119,7 +119,7 @@ int SpiDeviceRegister(struct SpiHardwareDevice *spi_device, void *spi_param, con
x_err_t ret = EOK;
static x_bool dev_link_flag = RET_FALSE;
if (dev_link_flag) {
if (!dev_link_flag) {
SpiDeviceLinkInit();
dev_link_flag = RET_TRUE;
}

2
resources/timer/dev_hwtimer.c

@ -57,7 +57,7 @@ int HwtimerDeviceRegister(struct HwtimerHardwareDevice *hwtimer_device, void *hw
x_err_t ret = EOK;
static x_bool dev_link_flag = RET_FALSE;
if (dev_link_flag) {
if (!dev_link_flag) {
HwtimerDeviceLinkInit();
dev_link_flag = RET_TRUE;
}

2
resources/usb/dev_usb.c

@ -59,7 +59,7 @@ int USBDeviceRegister(struct UsbHardwareDevice *usb_device, void *usb_param, con
x_err_t ret = EOK;
static x_bool dev_link_flag = RET_FALSE;
if (dev_link_flag) {
if (!dev_link_flag) {
USBDeviceLinkInit();
dev_link_flag = RET_TRUE;
}

6
resources/watchdog/dev_wdt.c

@ -55,11 +55,11 @@ int WdtDeviceRegister(struct WdtHardwareDevice *wdt_device, const char *device_n
NULL_PARAM_CHECK(device_name);
x_err_t ret = EOK;
static x_bool DevLinkFlag = RET_FALSE;
static x_bool dev_link_flag = RET_FALSE;
if (DevLinkFlag) {
if (!dev_link_flag) {
WdtDeviceLinkInit();
DevLinkFlag = RET_TRUE;
dev_link_flag = RET_TRUE;
}
if (DEV_INSTALL != wdt_device->haldev.dev_state) {

6
resources/watchdog/drv_wdt.c

@ -54,11 +54,11 @@ int WdtDriverRegister(struct Driver *driver)
NULL_PARAM_CHECK(driver);
x_err_t ret = EOK;
static x_bool DriverLinkFlag = RET_FALSE;
static x_bool driver_link_flag = RET_FALSE;
if (!DriverLinkFlag) {
if (!driver_link_flag) {
WdtDrvLinkInit();
DriverLinkFlag = RET_TRUE;
driver_link_flag = RET_TRUE;
}
DoubleLinkListInsertNodeAfter(&wdtdrv_linklist, &(driver->driver_link));

Loading…
Cancel
Save