#include "../cache.h" #include "progress.h" static void null_progress__update(struct ui_progress *p __maybe_unused) { } static struct ui_progress_ops null_progress__ops = { .update = null_progress__update, }; struct ui_progress_ops *ui_progress__ops = &null_progress__ops; void ui_progress__update(struct ui_progress *p, u64 adv) { p->curr += adv; if (p->curr >= p->next) { p->next += p->step; ui_progress__ops->update(p); } } void ui_progress__init(struct ui_progress *p, u64 total, const char *title) { p->curr = 0; p->next = p->step = total / 16; p->total = total; p->title = title; } void ui_progress__finish(void) { if (ui_progress__ops->finish) ui_progress__ops->finish(); } .cgi/'>cgit logo index : net-next.git
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hasler <mahasler@gmail.com>2016-11-03 19:47:42 +0100
committerJiri Kosina <jkosina@suse.cz>2016-11-03 14:51:29 -0600
commitf8690450f3d0d415f42c94f7e69258d8ba54ff29 (patch)
tree228ecd25d13e859fb6c27e94807de34656a2bb0c
parentb2554000f5b5d2a3a368d09c6debf7da64901fcf (diff)
HID: Add new force feedback driver for Mayflash game controller adapters
Add a new module named hid-mf that implements force feedback for game controller adapters manufactured by Mayflash. Currently only the PS3 adapter is supported, other adapters still need to be tested. Signed-off-by: Marcel Hasler <mahasler@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat