Searched refs:stmf (Results 1 - 1 of 1) sorted by relevance

/linux-4.4.14/drivers/hwtracing/stm/
H A Dcore.c329 struct stm_file *stmf; stm_char_open() local
338 stmf = kzalloc(sizeof(*stmf), GFP_KERNEL); stm_char_open()
339 if (!stmf) stm_char_open()
342 stmf->stm = to_stm_device(dev); stm_char_open()
344 if (!try_module_get(stmf->stm->owner)) stm_char_open()
347 file->private_data = stmf; stm_char_open()
352 kfree(stmf); stm_char_open()
359 struct stm_file *stmf = file->private_data; stm_char_release() local
361 stm_output_free(stmf->stm, &stmf->output); stm_char_release()
362 stm_put_device(stmf->stm); stm_char_release()
363 kfree(stmf); stm_char_release()
368 static int stm_file_assign(struct stm_file *stmf, char *id, unsigned int width) stm_file_assign() argument
370 struct stm_device *stm = stmf->stm; stm_file_assign()
373 stmf->policy_node = stp_policy_node_lookup(stm, id); stm_file_assign()
375 ret = stm_output_assign(stm, width, stmf->policy_node, &stmf->output); stm_file_assign()
377 if (stmf->policy_node) stm_file_assign()
378 stp_policy_node_put(stmf->policy_node); stm_file_assign()
404 struct stm_file *stmf = file->private_data; stm_char_write() local
405 struct stm_device *stm = stmf->stm; stm_char_write()
413 if (!stmf->output.nr_chans) { stm_char_write()
414 err = stm_file_assign(stmf, "default", 1); stm_char_write()
433 stm_write(stm->data, stmf->output.master, stmf->output.channel, kbuf, stm_char_write()
443 struct stm_file *stmf = file->private_data; stm_char_mmap() local
444 struct stm_device *stm = stmf->stm; stm_char_mmap()
455 if (stmf->output.nr_chans * stm->data->sw_mmiosz != size) stm_char_mmap()
458 phys = stm->data->mmio_addr(stm->data, stmf->output.master, stm_char_mmap()
459 stmf->output.channel, stm_char_mmap()
460 stmf->output.nr_chans); stm_char_mmap()
472 static int stm_char_policy_set_ioctl(struct stm_file *stmf, void __user *arg) stm_char_policy_set_ioctl() argument
474 struct stm_device *stm = stmf->stm; stm_char_policy_set_ioctl()
479 if (stmf->output.nr_chans) stm_char_policy_set_ioctl()
508 ret = stm_file_assign(stmf, id->id, id->width); stm_char_policy_set_ioctl()
515 ret = stm->data->link(stm->data, stmf->output.master, stm_char_policy_set_ioctl()
516 stmf->output.channel); stm_char_policy_set_ioctl()
519 stm_output_free(stmf->stm, &stmf->output); stm_char_policy_set_ioctl()
520 stm_put_device(stmf->stm); stm_char_policy_set_ioctl()
529 static int stm_char_policy_get_ioctl(struct stm_file *stmf, void __user *arg) stm_char_policy_get_ioctl() argument
533 .master = stmf->output.master, stm_char_policy_get_ioctl()
534 .channel = stmf->output.channel, stm_char_policy_get_ioctl()
535 .width = stmf->output.nr_chans, stm_char_policy_get_ioctl()
546 struct stm_file *stmf = file->private_data; stm_char_ioctl() local
547 struct stm_data *stm_data = stmf->stm->data; stm_char_ioctl()
553 err = stm_char_policy_set_ioctl(stmf, (void __user *)arg); stm_char_ioctl()
557 return stm_char_policy_get_ioctl(stmf, (void __user *)arg); stm_char_ioctl()
560 return stm_char_policy_get_ioctl(stmf, (void __user *)arg); stm_char_ioctl()
568 stmf->output.master, stm_char_ioctl()
569 stmf->output.channel, stm_char_ioctl()
570 stmf->output.nr_chans, stm_char_ioctl()

Completed in 268 milliseconds