Lines Matching refs:con_driver
117 struct con_driver { struct
127 static struct con_driver registered_con_driver[MAX_NR_CON_DRIVER]; argument
3508 struct con_driver *con_driver = ®istered_con_driver[i]; in con_init() local
3510 if (con_driver->con == NULL) { in con_init()
3511 con_driver->con = conswitchp; in con_init()
3512 con_driver->desc = display_desc; in con_init()
3513 con_driver->flag = CON_DRIVER_FLAG_INIT; in con_init()
3514 con_driver->first = 0; in con_init()
3515 con_driver->last = MAX_NR_CONSOLES - 1; in con_init()
3644 struct con_driver *con_driver; in do_bind_con_driver() local
3654 con_driver = ®istered_con_driver[i]; in do_bind_con_driver()
3656 if (con_driver->con == csw) { in do_bind_con_driver()
3657 desc = con_driver->desc; in do_bind_con_driver()
3666 if (!(con_driver->flag & CON_DRIVER_FLAG_INIT)) { in do_bind_con_driver()
3668 con_driver->flag |= CON_DRIVER_FLAG_INIT; in do_bind_con_driver()
3679 first = max(first, con_driver->first); in do_bind_con_driver()
3680 last = min(last, con_driver->last); in do_bind_con_driver()
3746 struct con_driver *con_driver = NULL, *con_back = NULL; in do_unbind_con_driver() local
3756 con_driver = ®istered_con_driver[i]; in do_unbind_con_driver()
3758 if (con_driver->con == csw && in do_unbind_con_driver()
3759 con_driver->flag & CON_DRIVER_FLAG_MODULE) { in do_unbind_con_driver()
3787 first = max(first, con_driver->first); in do_unbind_con_driver()
3788 last = min(last, con_driver->last); in do_unbind_con_driver()
3810 con_driver->flag &= ~CON_DRIVER_FLAG_INIT; in do_unbind_con_driver()
3821 static int vt_bind(struct con_driver *con) in vt_bind()
3832 struct con_driver *con = ®istered_con_driver[i]; in vt_bind()
3871 static int vt_unbind(struct con_driver *con) in vt_unbind()
3913 static inline int vt_bind(struct con_driver *con) in vt_bind()
3917 static inline int vt_unbind(struct con_driver *con) in vt_unbind()
3926 struct con_driver *con = dev_get_drvdata(dev); in store_bind()
3944 struct con_driver *con = dev_get_drvdata(dev); in show_bind()
3957 struct con_driver *con = dev_get_drvdata(dev); in show_name()
3976 static int vtconsole_init_device(struct con_driver *con) in vtconsole_init_device()
3982 static void vtconsole_deinit_device(struct con_driver *con) in vtconsole_deinit_device()
4116 struct con_driver *con_driver; in do_register_con_driver() local
4126 con_driver = ®istered_con_driver[i]; in do_register_con_driver()
4129 if (con_driver->con == csw) { in do_register_con_driver()
4144 con_driver = ®istered_con_driver[i]; in do_register_con_driver()
4146 if (con_driver->con == NULL && in do_register_con_driver()
4147 !(con_driver->flag & CON_DRIVER_FLAG_ZOMBIE)) { in do_register_con_driver()
4148 con_driver->con = csw; in do_register_con_driver()
4149 con_driver->desc = desc; in do_register_con_driver()
4150 con_driver->node = i; in do_register_con_driver()
4151 con_driver->flag = CON_DRIVER_FLAG_MODULE | in do_register_con_driver()
4153 con_driver->first = first; in do_register_con_driver()
4154 con_driver->last = last; in do_register_con_driver()
4163 con_driver->dev = in do_register_con_driver()
4165 MKDEV(0, con_driver->node), in do_register_con_driver()
4166 con_driver, con_dev_groups, in do_register_con_driver()
4167 "vtcon%i", con_driver->node); in do_register_con_driver()
4168 if (IS_ERR(con_driver->dev)) { in do_register_con_driver()
4170 con_driver->desc, PTR_ERR(con_driver->dev)); in do_register_con_driver()
4171 con_driver->dev = NULL; in do_register_con_driver()
4173 vtconsole_init_device(con_driver); in do_register_con_driver()
4205 struct con_driver *con_driver = ®istered_con_driver[i]; in do_unregister_con_driver() local
4207 if (con_driver->con == csw) { in do_unregister_con_driver()
4218 con_driver->con = NULL; in do_unregister_con_driver()
4219 con_driver->flag = CON_DRIVER_FLAG_ZOMBIE; in do_unregister_con_driver()
4237 struct con_driver *con_driver = ®istered_con_driver[i]; in con_driver_unregister_callback() local
4239 if (!(con_driver->flag & CON_DRIVER_FLAG_ZOMBIE)) in con_driver_unregister_callback()
4244 vtconsole_deinit_device(con_driver); in con_driver_unregister_callback()
4245 device_destroy(vtconsole_class, MKDEV(0, con_driver->node)); in con_driver_unregister_callback()
4249 if (WARN_ON_ONCE(con_driver->con)) in con_driver_unregister_callback()
4250 con_driver->con = NULL; in con_driver_unregister_callback()
4251 con_driver->desc = NULL; in con_driver_unregister_callback()
4252 con_driver->dev = NULL; in con_driver_unregister_callback()
4253 con_driver->node = 0; in con_driver_unregister_callback()
4254 WARN_ON_ONCE(con_driver->flag != CON_DRIVER_FLAG_ZOMBIE); in con_driver_unregister_callback()
4255 con_driver->flag = 0; in con_driver_unregister_callback()
4256 con_driver->first = 0; in con_driver_unregister_callback()
4257 con_driver->last = 0; in con_driver_unregister_callback()
4314 struct con_driver *con = ®istered_con_driver[i]; in vtconsole_class_init()