Loading drivers/net/can/spi/k61.c +14 −10 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ #define XFER_BUFFER_SIZE 64 #define K61_CLOCK 120000000 #define K61_MAX_CHANNELS 1 #define K61_FW_QUERY_RETRY_COUNT 3 struct k61_can { struct net_device *netdev; Loading Loading @@ -366,7 +367,7 @@ static int k61_query_firmware_version(struct k61_can *priv_data) if (ret == 0) { wait_for_completion_interruptible_timeout( &priv_data->response_completion, 0.1 * HZ); &priv_data->response_completion, 0.001 * HZ); ret = priv_data->cmd_result; } Loading Loading @@ -806,7 +807,7 @@ cleanup_privdata: static int k61_probe(struct spi_device *spi) { int err; int err, retry = 0, query_err = -1; struct k61_can *priv_data; struct device *dev; Loading Loading @@ -842,10 +843,10 @@ static int k61_probe(struct spi_device *spi) gpio_direction_output(priv_data->reset, 0); udelay(1); gpio_direction_output(priv_data->reset, 1); /* Provide a delay of 10us for the chip to reset. This is part of /* Provide a delay of 300us for the chip to reset. This is part of * the reset sequence. */ usleep_range(10, 11); usleep_range(300, 301); err = k61_create_netdev(spi, priv_data); if (err) { Loading @@ -868,9 +869,12 @@ static int k61_probe(struct spi_device *spi) } dev_dbg(dev, "Request irq %d ret %d\n", spi->irq, err); err = k61_query_firmware_version(priv_data); while ((query_err != 0) && (retry < K61_FW_QUERY_RETRY_COUNT)) { query_err = k61_query_firmware_version(priv_data); retry++; } if (err) { if (query_err) { dev_info(dev, "K61 probe failed\n"); err = -ENODEV; goto free_irq; Loading Loading
drivers/net/can/spi/k61.c +14 −10 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ #define XFER_BUFFER_SIZE 64 #define K61_CLOCK 120000000 #define K61_MAX_CHANNELS 1 #define K61_FW_QUERY_RETRY_COUNT 3 struct k61_can { struct net_device *netdev; Loading Loading @@ -366,7 +367,7 @@ static int k61_query_firmware_version(struct k61_can *priv_data) if (ret == 0) { wait_for_completion_interruptible_timeout( &priv_data->response_completion, 0.1 * HZ); &priv_data->response_completion, 0.001 * HZ); ret = priv_data->cmd_result; } Loading Loading @@ -806,7 +807,7 @@ cleanup_privdata: static int k61_probe(struct spi_device *spi) { int err; int err, retry = 0, query_err = -1; struct k61_can *priv_data; struct device *dev; Loading Loading @@ -842,10 +843,10 @@ static int k61_probe(struct spi_device *spi) gpio_direction_output(priv_data->reset, 0); udelay(1); gpio_direction_output(priv_data->reset, 1); /* Provide a delay of 10us for the chip to reset. This is part of /* Provide a delay of 300us for the chip to reset. This is part of * the reset sequence. */ usleep_range(10, 11); usleep_range(300, 301); err = k61_create_netdev(spi, priv_data); if (err) { Loading @@ -868,9 +869,12 @@ static int k61_probe(struct spi_device *spi) } dev_dbg(dev, "Request irq %d ret %d\n", spi->irq, err); err = k61_query_firmware_version(priv_data); while ((query_err != 0) && (retry < K61_FW_QUERY_RETRY_COUNT)) { query_err = k61_query_firmware_version(priv_data); retry++; } if (err) { if (query_err) { dev_info(dev, "K61 probe failed\n"); err = -ENODEV; goto free_irq; Loading