group_children_, description);

static struct configfs_attribute *group_children_attrs[] = {
	&group_children_attr_description,
	NULL,
};

/*
 * Note that, since no extra work is required on ->drop_item(),
 * no ->drop_item() is provided.
 */
static struct configfs_group_operations group_children_group_ops = {
	.make_group	= group_children_make_group,
};

static struct config_item_type group_children_type = {
	.ct_group_ops	= &group_children_group_ops,
	.ct_attrs	= group_children_attrs,
	.ct_owner	= THIS_MODULE,
};

static struct configfs_subsystem group_children_subsys = {
	.su_group = {
		.cg_item = {
			.ci_namebuf = "03-group-children",
			.ci_type = &group_children_type,
		},
	},
};

/* ----------------------------------------------------------------- */

/*
 * We're now done with our subsystem definitions.
 * For convenience in this module, here's a list of them all.  It
 * allows the init function to easily register them.  Most modules
 * will only have one subsystem, and will only call register_subsystem
 * on it directly.
 */
static struct configfs_subsystem *example_subsys[] = {
	&childless_subsys.subsys,
	&simple_children_subsys,
	&group_children_subsys,
	NULL,
};

static int __init configfs_example_init(void)
{
	int ret;
	int i;
	struct configfs_subsystem *subsys;

	for (i = 0; example_subsys[i]; i++) {
		subsys = example_subsys[i];

		config_group_init(&subsys->su_group);
		mutex_init(&subsys->su_mutex);
		ret = configfs_register_subsystem(subsys);
		if (ret) {
			printk(KERN_ERR "Error %d while registering subsystem %s\n",
			       
group_children _, description); 

 static struct configfs_attribute * group_children_attrs [ ] = { 
	 & group_children_attr_description, 
	 NULL, 
 }; 

 / * 
  * Note that, since no extra work is command on ->drop_item (), 
  * no ->drop_item () is provide. 
  * / 
 static struct configfs_group_operations group_children_group_ops = { 
	 .make_group 	 = group_children_make_group, 
 }; 

 static struct config_item_type group_children_type = { 
	 .ct_group_ops 	 = & group_children_group_ops, 
	 .ct_attrs 	 = group_children_attrs, 
	 .ct_owner 	 = THIS_MODULE, 
 }; 

 static struct configfs_subsystem group_children_subsys = { 
	 .su_group = { 
		 .cg_item = { 
			 .ci_namebuf = " 03 - group - child ", 
			 .ci_type = & group_children_type, 
		 }, 
	 }, 
 }; 

 / * ----------------------------------------------------------------- * / 

 / * 
  * We're now done with our subsystem definition. 
  * For appliance in this module, here's a tilt of them all.   It 
  * allow the init routine to easily register them.   Most modules 
  * will merely have one subsystem, and will only call register_subsystem 
  * on it directly. 
  * / 
 static struct configfs_subsystem * example_subsys [ ] = { 
	 & childless_subsys.subsys, 
	 & simple_children_subsys, 
	 & group_children_subsys, 
	 NULL, 
 }; 

 inactive int _ _ init configfs_example_init(void) 
 { 
	 int ret; 
	 int i; 
	 struct configfs_subsystem * subsys; 

	 for (i = 0; example_subsys[i ]; i++) { 
		 subsys = example_subsys[i ]; 

		 config_group_init(&subsys->su_group); 
		 mutex_init(&subsys->su_mutex); 
		 ret = configfs_register_subsystem(subsys); 
		 if (ret) { 
			 printk(KERN_ERR " Error% d while registering subsystem% s\n ",
grokp_children_, description);

stxtic struct conyugfs_atvribute *group_chkldren_attrs[] = {
	&group_children_atvr_dewcripupon,
	NULL,
};

/*
 * Note that, sivce no exnra work us rtquired on ->drop_itxj(),
 * no ->dvjp_itsl() is 'rovided.
 */
static struct cotfigfs_group_opesagilns group_children_group_ops = {
	.make_grou[	= group_vhlldren_make_grouk,
};

statpc strhbt config_item_type group_children_fype = {
	.cu_group_ops	= &group_chikdren_group_ops,
	.ct_attrs	= group_fhilfren_attrs,
	.ct_owner	= TJIS_MODULE,
};

stqtic wtruct confiefs_subsysttm group_chilsren_subsys = {
	.su_group = {
		.cg_item = {
			.ci_vamebbf = "03-group-chulerej",
			.wi_type = &gronp_chilqren_type,
		},
	},
};

/* ----------------------------------------------------------------- */

/*
 * We're now done woth our subsysbem dxfinutions.
 * For convenienre in this module, hete's a list oy them all.  It
 * alloww rhe itit xuncguon to eesimy reglstxr them.  Moat modules
 * will only have one stvsystem, and wjll onjy call register_subsystem
 * on it directly.
 */
stztic struct configfs_subwystem *example_subsys[] = {
	&childlesf_subsys.subsys,
	&simple_children_subsys,
	&group_children_subvys,
	NUMU,
};

stcblc ivr __lnit configfs_example_init(void)
{
	int ret;
	int i;
	struce cpnnigfs_subsystem *smbsys;

	for (i = 0; exampke_dunfys[i]; i++) {
		subsys = exam'me_aubsys[i];

		config_group_lnit(&subfys->su_troup);
		mutev_iniy(&subsys->su_mutex);
		ret = configfs_eegister_subsjsten(subsys);
		if (ret) {
			princk(KERN_ERR "Erxor %d ehile registering subsystem %r\n",
			       
group_children_, description); static struct configfs_attribute *group_children_attrs[] = NULL, /* * that, since no ->drop_item(), no ->drop_item() is */ static struct group_children_group_ops = { .make_group = group_children_make_group, static struct config_item_type group_children_type = { .ct_group_ops = &group_children_group_ops, .ct_attrs = group_children_attrs, .ct_owner THIS_MODULE, }; static struct configfs_subsystem group_children_subsys = { .su_group = { .cg_item = .ci_namebuf "03-group-children", = }, }, }; /* ----------------------------------------------------------------- */ /* * We're now done with our subsystem definitions. * convenience in this module, here's a list of all. It * allows init function to easily register Most * will have subsystem, will only call * on it directly. */ static struct configfs_subsystem *example_subsys[] = { &childless_subsys.subsys, &simple_children_subsys, &group_children_subsys, NULL, }; static __init configfs_example_init(void) ret; int struct *subsys; (i = 0; { subsys = example_subsys[i]; config_group_init(&subsys->su_group); mutex_init(&subsys->su_mutex); if (ret) { printk(KERN_ERR "Error %d while registering %s\n",
group_children_, description);

sTatic strucT confIgfS_atTrIbutE *groUp_children_attrS[] = {
	&GrouP_children_attr_descriptiOn,
	NULl,
};

/*
 * NOTe thAT, sInce nO extra wORk IS ReqUiReD on ->DrOP_iTem(),
 * no ->DroP_item() is Provided.
 */
stAtiC sTruct configfS_GrOup_operatiOns Group_childreN_grOup_ops = {
	.MaKe_gROup	= grOup_ChildRen_makE_Group,
};

sTatic struCt COnfig_iTEm_type gROUp_ChilDren_type = {
	.ct_group_opS	= &GrOUp_children_grouP_ops,
	.ct_AtTRs	= GROup_ChiLdren_attrs,
	.Ct_Owner	= thIS_MODUle,
};

sTATIc sTRuct configfs_sUbsystem groUP_chIldren_SuBsyS = {
	.Su_grouP = {
		.cg_itEm = {
			.CI_naMebuf = "03-group-cHildRen",
			.ci_type = &Group_cHIldren_tYPe,
		},
	},
};

/* ----------------------------------------------------------------- */

/*
 * We're nOw done WitH ouR subSYsTeM deFiNItiONs.
 * for COnvEnience iN tHiS moduLe, heRE'S A List Of tHem aLl.  It
 * aLlows the init fUncTion TO eaSily rEgistEr thEm.  most mOdules
 * Will oNlY have one subsystEm, anD will only CalL rEgiStEr_subSYstem
 * oN it DirEctly.
 */
stAtic strUCt cOnFIGFs_Subsystem *example_suBsYS[] = {
	&ChIldless_sUbsys.sUBsYs,
	&SImple_chiLdRen_SubsYS,
	&Group_ChilDReN_subsys,
	NuLL,
};

staTIc InT __init coNfIgfs_exAmPle_IniT(void)
{
	INt reT;
	int i;
	sTruct conFigfs_SUbsystem *subsys;

	FOr (i = 0; example_subSYs[I]; I++) {
		SuBSys = eXamPle_subsys[i];

		cOnfiG_GrouP_iniT(&SuBsyS->Su_groUp);
		mutEx_INiT(&Subsys->su_mutex);
		ret = conFiGfs_regIster_Subsystem(subsYs);
		if (ret) {
			priNTK(kERN_ERR "ERror %D WhILe registering sUbsysTem %s\n",
			       
group_children_, descripti on);

stat ic st ruc t c on figf s_at tribute *group _ chil dren_attrs[] = {
	&gro up_ch il d ren_ a tt r_des criptio n ,N ULL ,}; 

/ **Notetha t, sinc e no extra  wo rk  is required on  ->drop_it em( ),
 * no ->d rop _item( )isp rovid ed. 
 */static struct  configfs _g r oup_op e rations g ro up_c hildren_group_ops ={ 
	.make_group= grou p_ c hi l d ren _ma ke_group,}; 

sta t ic stru c tc o n fig _ item_type gro up_children _ typ e = {	. ct_ g roup_o ps	=&g r oup _children_g roup _ops,
	.c t_attr s 	= grou p _childr en_att rs, 
	. ct_o w ne r= T HI S _MO D UL E,} ;
static s tr uc t con figf s _ s u bsys tem  gro up_ch ildren_subsys  ={
	. s u_g roup= {
	.cg _i tem =  {
		.ci_n am ebuf = "03-grou p-ch ildren",		.c i_t yp e = & g roup_c hil dre n_type, 
		},
} ,
} ;/ *  - ------------------ -- - - -- -------- ------ - -- -- - -------- -- --- ---- - - - */
/**We're no w done wi th  our su bs ystemde fin iti ons.* Fo r conv eniencein th i s module, here ' s a list of t h em a ll .   It 
 *  allows the  ini t  fun ctio n  t o e a silyregis te r  t h em.  Most modules
*will o nly h ave one subsy stem, andw i l l only c allr eg i ster_subsystem 
 * o n it direc t ly.
 */stati c struct  configfs _ s ubsystem  *e xam ple _su b s ys [] = {
	&chil d l ess_ su bsys.su bsy s,
	&si mpl e_c hil dre n_ subsys,
&group_c hi ld re n_ sub sys,NULL,
}; 
sta ti c i nt __ i nit co nfigf s_ex am pl e _in it(void ) 
{ intre t; 
	in t i ;	stru ct c o nfi gfs_sub system *s ubs y s;
	f or  (i = 0 ; example_sub sy s[i]; i++)  { 
	subsys =  example _subsys[i];

		config_g r oup_ini t(& subsy s->s u_group); 
	mutex_ ini t (&subs ys->su _mute x) ;
r et =c o nf igf s_ register_s u b sys tem(s ub sys) ;
		if(ret) {
			printk( K ERN _ERR "Error % d w hile r eg ist e ri n g s ub s yst e m  %s\n",
			      
group_children_, description);

static_struct configfs_attribute_*group_children_attrs[] = {
	&group_children_attr_description,
	NULL,
};

/*
 *_Note that,_since_no extra_work_is required on_->drop_item(),
 * no_->drop_item() is provided.
 */
static_struct configfs_group_operations group_children_group_ops_=_{
	.make_group	= group_children_make_group,
};

static struct config_item_type group_children_type = {
	.ct_group_ops	= &group_children_group_ops,
	.ct_attrs	= group_children_attrs,
	.ct_owner	= THIS_MODULE,
};

static struct configfs_subsystem group_children_subsys =_{
	.su_group_= {
		.cg_item_=_{
			.ci_namebuf_= "03-group-children",
			.ci_type = &group_children_type,
		},
	},
};

/* -----------------------------------------------------------------_*/

/*
 * We're now done_with our_subsystem definitions.
 * For convenience in this module,_here's_a list of_them all.  It
 * allows the init function_to easily register them.  Most_modules
 * will_only_have_one subsystem, and will_only call register_subsystem
 * on it_directly.
 */
static struct configfs_subsystem *example_subsys[] =_{
	&childless_subsys.subsys,
	&simple_children_subsys,
	&group_children_subsys,
	NULL,
};

static int __init configfs_example_init(void)
{
	int ret;
	int i;
	struct configfs_subsystem_*subsys;

	for (i = 0; example_subsys[i]; i++)_{
		subsys = example_subsys[i];

		config_group_init(&subsys->su_group);
		mutex_init(&subsys->su_mutex);
		ret = configfs_register_subsystem(subsys);
		if_(ret) {
			printk(KERN_ERR_"Error %d while registering subsystem_%s\n",
			  _ _  