i2c: fix struct initialization
pn532_i2c.c:125:57: warning: missing field 'tv_nsec' initializer [-Wmissing-field-initializers] struct timespec transaction_start, bus_free_time = { 0 }; ^ pn532_i2c.c:153:57: warning: missing field 'tv_nsec' initializer [-Wmissing-field-initializers] struct timespec transaction_start, bus_free_time = { 0 };
This commit is contained in:
parent
c815c7a059
commit
05220537ea
1 changed files with 2 additions and 2 deletions
|
@ -122,7 +122,7 @@ static struct timespec __transaction_stop;
|
||||||
static ssize_t pn532_i2c_read(const i2c_device id,
|
static ssize_t pn532_i2c_read(const i2c_device id,
|
||||||
uint8_t *buf, const size_t len)
|
uint8_t *buf, const size_t len)
|
||||||
{
|
{
|
||||||
struct timespec transaction_start, bus_free_time = { 0 };
|
struct timespec transaction_start, bus_free_time = { 0, 0 };
|
||||||
ssize_t ret;
|
ssize_t ret;
|
||||||
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &transaction_start);
|
clock_gettime(CLOCK_MONOTONIC, &transaction_start);
|
||||||
|
@ -150,7 +150,7 @@ static ssize_t pn532_i2c_read(const i2c_device id,
|
||||||
static ssize_t pn532_i2c_write(const i2c_device id,
|
static ssize_t pn532_i2c_write(const i2c_device id,
|
||||||
const uint8_t *buf, const size_t len)
|
const uint8_t *buf, const size_t len)
|
||||||
{
|
{
|
||||||
struct timespec transaction_start, bus_free_time = { 0 };
|
struct timespec transaction_start, bus_free_time = { 0, 0 };
|
||||||
ssize_t ret;
|
ssize_t ret;
|
||||||
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &transaction_start);
|
clock_gettime(CLOCK_MONOTONIC, &transaction_start);
|
||||||
|
|
Loading…
Reference in a new issue