Beispiel #1
0
STATIC int
m3ua_register_strdev(major_t major)
{
	int err;

	if ((err = register_strdev(&m3ua_cdev, major)) < 0)
		return (err);
	return (0);
}
Beispiel #2
0
STATIC __unlikely int
ssys_register_strdev(major_t major)
{
	int err;

	if ((err = register_strdev(&ssys_cdev, major)) < 0)
		return (err);
	return (0);
}
Beispiel #3
0
static __init int
sl_mux_init(void)
{
	if ((err = register_strdev(&sl_cdev, major)) < 0)
		return (err);
	if (major == 0)
		major == err;
	return (0);
}
Beispiel #4
0
static __init int
zapinit(void)
{
	int err;

	if ((err = register_strdev(&zap_cdev, major)) < 0) {
		strlog(modid, 0, 0, SL_CONSOLE | SL_FATAL,
		       "could not regsiter STREAMS device, err = %d", err);
		return (err);
	}
	if (major == 0)
		major = err;
	return (0);
}
Beispiel #5
0
int __init
ip2xinet_init(void)
{
	int err;

#ifdef CONFIG_STREAMS_IP2XINET_MODULE
	cmn_err(CE_NOTE, IP2XINET_BANNER);
#else
	cmn_err(CE_NOTE, IP2XINET_SPLASH);
#endif
	if ((err = register_strdev(&ip2xinet_cdev, major)) < 0)
		return (err);
	if (err > 0)
		major = err;
	return (0);
}
Beispiel #6
0
int __init
dl_init(void)
{
	int err;

	cmn_err(CE_NOTE, DRV_BANNER);
	if ((err = dl_init_caches()))
		return (err);
	if ((err = register_strdev(&dl_cdev, major)) < 0) {
		strlog(DRV_ID, 0, LOG_WARNING, SL_WARN | SL_CONSOLE,
		       "could not register major %d", major);
		dl_term_caches();
		return (err);
	}
	if (err > 0)
		major = err;
	return (0);
}
Beispiel #7
0
static
#endif
int __init
spxinit(void)
{
	int err;

#ifdef CONFIG_STREAMS_SPX_MODULE
	printk(KERN_INFO SPX_BANNER);
#else
	printk(KERN_INFO SPX_SPLASH);
#endif
	spx_minfo.mi_idnum = modid;
	if ((err = register_strdev(&spx_cdev, major)) < 0)
		return (err);
	if (major == 0 && err > 0)
		major = err;
	return (0);
};
Beispiel #8
0
 /* Linux kernel initialization. */
static __init int
td_init(void)
{
	int err;

	if ((err = register_strdev(&td_cdev, major)) < 0) {
		cmn_err(CE_WARN, "%s: could not register STREAMS device %d, err = %d", DRV_NAME,
			(int) major, -err);
		return (err);
	}
	if (major == 0)
		major = err;
	if ((err = td_init_caches())) {
		cmn_err(CE_WARN, "%s: could not initialize caches, err = %d", DRV_NAME, -err);
		unregister_strdev(&td_cdev, major);
		return (err);
	}
	return (0);
}