Lines Matching refs:work_data
21 static void atmel_sha204a_rng_done(struct atmel_i2c_work_data *work_data, in atmel_sha204a_rng_done() argument
24 struct atmel_i2c_client_priv *i2c_priv = work_data->ctx; in atmel_sha204a_rng_done()
32 rng->priv = (unsigned long)work_data; in atmel_sha204a_rng_done()
40 struct atmel_i2c_work_data *work_data; in atmel_sha204a_rng_read_nonblocking() local
49 work_data = (struct atmel_i2c_work_data *)rng->priv; in atmel_sha204a_rng_read_nonblocking()
50 max = min(sizeof(work_data->cmd.data), max); in atmel_sha204a_rng_read_nonblocking()
51 memcpy(data, &work_data->cmd.data, max); in atmel_sha204a_rng_read_nonblocking()
54 work_data = kmalloc(sizeof(*work_data), GFP_ATOMIC); in atmel_sha204a_rng_read_nonblocking()
55 if (!work_data) in atmel_sha204a_rng_read_nonblocking()
58 work_data->ctx = i2c_priv; in atmel_sha204a_rng_read_nonblocking()
59 work_data->client = i2c_priv->client; in atmel_sha204a_rng_read_nonblocking()
64 atmel_i2c_init_random_cmd(&work_data->cmd); in atmel_sha204a_rng_read_nonblocking()
65 atmel_i2c_enqueue(work_data, atmel_sha204a_rng_done, rng); in atmel_sha204a_rng_read_nonblocking()