Lines Matching refs:reboot
22 static unsigned int get_reboot_mode_magic(struct reboot_mode_driver *reboot, in get_reboot_mode_magic() argument
32 list_for_each_entry(info, &reboot->head, list) { in get_reboot_mode_magic()
45 struct reboot_mode_driver *reboot; in reboot_mode_notify() local
48 reboot = container_of(this, struct reboot_mode_driver, reboot_notifier); in reboot_mode_notify()
49 magic = get_reboot_mode_magic(reboot, cmd); in reboot_mode_notify()
51 reboot->write(reboot, magic); in reboot_mode_notify()
62 int reboot_mode_register(struct reboot_mode_driver *reboot) in reboot_mode_register() argument
66 struct device_node *np = reboot->dev->of_node; in reboot_mode_register()
70 INIT_LIST_HEAD(&reboot->head); in reboot_mode_register()
76 info = devm_kzalloc(reboot->dev, sizeof(*info), GFP_KERNEL); in reboot_mode_register()
83 dev_err(reboot->dev, "reboot mode %s without magic number\n", in reboot_mode_register()
85 devm_kfree(reboot->dev, info); in reboot_mode_register()
96 dev_err(reboot->dev, "invalid mode name(%s): too short!\n", in reboot_mode_register()
101 list_add_tail(&info->list, &reboot->head); in reboot_mode_register()
104 reboot->reboot_notifier.notifier_call = reboot_mode_notify; in reboot_mode_register()
105 register_reboot_notifier(&reboot->reboot_notifier); in reboot_mode_register()
110 list_for_each_entry(info, &reboot->head, list) in reboot_mode_register()
121 int reboot_mode_unregister(struct reboot_mode_driver *reboot) in reboot_mode_unregister() argument
125 unregister_reboot_notifier(&reboot->reboot_notifier); in reboot_mode_unregister()
127 list_for_each_entry(info, &reboot->head, list) in reboot_mode_unregister()
147 struct reboot_mode_driver *reboot) in devm_reboot_mode_register() argument
156 rc = reboot_mode_register(reboot); in devm_reboot_mode_register()
162 *dr = reboot; in devm_reboot_mode_register()
185 struct reboot_mode_driver *reboot) in devm_reboot_mode_unregister() argument
189 devm_reboot_mode_match, reboot)); in devm_reboot_mode_unregister()