struct subchannel *cio_probe_console(void) { struct subchannel_id schid; struct subchannel *sch; int sch_no, ret; sch_no = cio_get_console_sch_no(); if (sch_no == -1) { pr_warning("No CCW console was found\n"); return ERR_PTR(-ENODEV); } init_subchannel_id(&schid); schid.sch_no = sch_no; sch = css_alloc_subchannel(schid); if (IS_ERR(sch)) return sch; lockdep_set_class(sch->lock, &console_sch_key); isc_register(CONSOLE_ISC); sch->config.isc = CONSOLE_ISC; sch->config.intparm = (u32)(addr_t)sch; ret = cio_commit_config(sch); if (ret) { isc_unregister(CONSOLE_ISC); put_device(&sch->dev); return ERR_PTR(ret); } console_sch = sch; return sch; }
int css_probe_device(int irq) { int ret; struct subchannel *sch; sch = css_alloc_subchannel(irq); if (IS_ERR(sch)) return PTR_ERR(sch); ret = css_register_subchannel(sch); if (ret) css_free_subchannel(sch); return ret; }
static int css_probe_device(struct subchannel_id schid) { struct subchannel *sch; int ret; sch = css_alloc_subchannel(schid); if (IS_ERR(sch)) return PTR_ERR(sch); ret = css_register_subchannel(sch); if (ret) put_device(&sch->dev); return ret; }
struct subchannel *cio_probe_console(void) { struct subchannel_id schid; struct subchannel *sch; int sch_no, ret; sch_no = cio_get_console_sch_no(); if (sch_no == -1) { pr_warning("No CCW console was found\n"); return ERR_PTR(-ENODEV); } init_subchannel_id(&schid); schid.sch_no = sch_no; sch = css_alloc_subchannel(schid); if (IS_ERR(sch)) return sch; lockdep_set_class(sch->lock, &console_sch_key); isc_reg