€• ?Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ+/translations/zh_CN/driver-api/misc_devices”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/zh_TW/driver-api/misc_devices”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/it_IT/driver-api/misc_devices”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/ja_JP/driver-api/misc_devices”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/ko_KR/driver-api/misc_devices”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/pt_BR/driver-api/misc_devices”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ+/translations/sp_SP/driver-api/misc_devices”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒMiscellaneous Devices”h]”hŒMiscellaneous Devices”…””}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³ŒE/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices.rst”h´KubhŒindex”“”)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œentries”]”(Œsingle”Œmisc_register (C function)”Œc.misc_register”hNt”auh1hËhh·h²hh³Nh´NubhŒdesc”“”)”}”(hhh]”(hŒdesc_signature”“”)”}”(hŒ+int misc_register (struct miscdevice *misc)”h]”hŒdesc_signature_line”“”)”}”(hŒ*int misc_register(struct miscdevice *misc)”h]”(hŒdesc_sig_keyword_type”“”)”}”(hŒint”h]”hŒint”…””}”(hhïh²hh³Nh´Nubah}”(h]”h ]”Œkt”ah"]”h$]”h&]”uh1híhhéh²hh³ŒZ/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices:4: ./drivers/char/misc.c”h´KÀubhŒdesc_sig_space”“”)”}”(hŒ ”h]”hŒ ”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”Œw”ah"]”h$]”h&]”uh1hÿhhéh²hh³hþh´KÀubhŒ desc_name”“”)”}”(hŒ misc_register”h]”hŒ desc_sig_name”“”)”}”(hŒ misc_register”h]”hŒ misc_register”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”Œn”ah"]”h$]”h&]”uh1jhjubah}”(h]”h ]”(Œsig-name”Œdescname”eh"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jhhéh²hh³hþh´KÀubhŒdesc_parameterlist”“”)”}”(hŒ(struct miscdevice *misc)”h]”hŒdesc_parameter”“”)”}”(hŒstruct miscdevice *misc”h]”(hŒdesc_sig_keyword”“”)”}”(hŒstruct”h]”hŒstruct”…””}”(hj?h²hh³Nh´Nubah}”(h]”h ]”Œk”ah"]”h$]”h&]”uh1j=hj9ubj)”}”(hŒ ”h]”hŒ ”…””}”(hjNh²hh³Nh´Nubah}”(h]”h ]”j ah"]”h$]”h&]”uh1hÿhj9ubh)”}”(hhh]”j)”}”(hŒ miscdevice”h]”hŒ miscdevice”…””}”(hj_h²hh³Nh´Nubah}”(h]”h ]”j#ah"]”h$]”h&]”uh1jhj\ubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”Œc”Œreftype”Œ identifier”Œ reftarget”jaŒmodname”NŒ classname”NŒ c:parent_key”Œsphinx.domains.c”Œ LookupKey”“”)”}”Œdata”]”j{Œ ASTIdentifier”“”)”}”jvjsbŒc.misc_register”†”asbuh1hhj9ubj)”}”(hŒ ”h]”hŒ ”…””}”(hjˆh²hh³Nh´Nubah}”(h]”h ]”j ah"]”h$]”h&]”uh1hÿhj9ubhŒdesc_sig_punctuation”“”)”}”(hŒ*”h]”hŒ*”…””}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”Œp”ah"]”h$]”h&]”uh1j–hj9ubj)”}”(hŒmisc”h]”hŒmisc”…””}”(hj§h²hh³Nh´Nubah}”(h]”h ]”j#ah"]”h$]”h&]”uh1jhj9ubeh}”(h]”h ]”h"]”h$]”h&]”Œnoemph”ˆj/j0uh1j7hj3ubah}”(h]”h ]”h"]”h$]”h&]”j/j0uh1j1hhéh²hh³hþh´KÀubeh}”(h]”h ]”h"]”h$]”h&]”j/j0Œ add_permalink”ˆuh1hçŒsphinx_line_type”Œ declarator”hhãh²hh³hþh´KÀubah}”(h]”hÚah ]”(Œsig”Œ sig-object”eh"]”h$]”h&]”Œ is_multiline”ˆŒ _toc_parts”)Œ _toc_name”huh1háh³hþh´KÀhhÞh²hubhŒ desc_content”“”)”}”(hhh]”hŒ paragraph”“”)”}”(hŒregister a miscellaneous device”h]”hŒregister a miscellaneous device”…””}”(hjÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÛh³ŒZ/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices:4: ./drivers/char/misc.c”h´KÀhjØh²hubah}”(h]”h ]”h"]”h$]”h&]”uh1jÖhhÞh²hh³hþh´KÀubeh}”(h]”h ]”(jtŒfunction”eh"]”h$]”h&]”Œdomain”jtŒobjtype”jõŒdesctype”jõŒnoindex”‰Œ noindexentry”‰Œnocontentsentry”‰uh1hÜh²hhh·h³Nh´NubhŒ container”“”)”}”(hXŸ**Parameters** ``struct miscdevice *misc`` device structure **Description** Register a miscellaneous device with the kernel. If the minor number is set to ``MISC_DYNAMIC_MINOR`` a minor number is assigned and placed in the minor field of the structure. For other cases the minor number requested is used. The structure passed is linked into the kernel and may not be destroyed until it has been unregistered. By default, an open() syscall to the device sets file->private_data to point to the structure. Drivers don't need open in fops for this. A zero is returned on success and a negative errno code for failure.”h]”(jÜ)”}”(hŒ**Parameters**”h]”hŒstrong”“”)”}”(hjh]”hŒ Parameters”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÛh³ŒZ/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices:4: ./drivers/char/misc.c”h´KÄhjubhŒdefinition_list”“”)”}”(hhh]”hŒdefinition_list_item”“”)”}”(hŒ-``struct miscdevice *misc`` device structure ”h]”(hŒterm”“”)”}”(hŒ``struct miscdevice *misc``”h]”hŒliteral”“”)”}”(hj.h]”hŒstruct miscdevice *misc”…””}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j0hj,ubah}”(h]”h ]”h"]”h$]”h&]”uh1j*h³ŒZ/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices:4: ./drivers/char/misc.c”h´KÁhj&ubhŒ definition”“”)”}”(hhh]”jÜ)”}”(hŒdevice structure”h]”hŒdevice structure”…””}”(hjKh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÛh³jEh´KÁhjHubah}”(h]”h ]”h"]”h$]”h&]”uh1jFhj&ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j$h³jEh´KÁhj!ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubjÜ)”}”(hŒ**Description**”h]”j )”}”(hjmh]”hŒ Description”…””}”(hjoh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjkubah}”(h]”h ]”h"]”h$]”h&]”uh1jÛh³ŒZ/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices:4: ./drivers/char/misc.c”h´KÃhjubhŒ block_quote”“”)”}”(hXRegister a miscellaneous device with the kernel. If the minor number is set to ``MISC_DYNAMIC_MINOR`` a minor number is assigned and placed in the minor field of the structure. For other cases the minor number requested is used. The structure passed is linked into the kernel and may not be destroyed until it has been unregistered. By default, an open() syscall to the device sets file->private_data to point to the structure. Drivers don't need open in fops for this. A zero is returned on success and a negative errno code for failure.”h]”(jÜ)”}”(hŒäRegister a miscellaneous device with the kernel. If the minor number is set to ``MISC_DYNAMIC_MINOR`` a minor number is assigned and placed in the minor field of the structure. For other cases the minor number requested is used.”h]”(hŒORegister a miscellaneous device with the kernel. If the minor number is set to ”…””}”(hj‰h²hh³Nh´Nubj1)”}”(hŒ``MISC_DYNAMIC_MINOR``”h]”hŒMISC_DYNAMIC_MINOR”…””}”(hj‘h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j0hj‰ubhŒ a minor number is assigned and placed in the minor field of the structure. For other cases the minor number requested is used.”…””}”(hj‰h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jÛh³ŒZ/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices:4: ./drivers/char/misc.c”h´KÂhj…ubjÜ)”}”(hŒðThe structure passed is linked into the kernel and may not be destroyed until it has been unregistered. By default, an open() syscall to the device sets file->private_data to point to the structure. Drivers don't need open in fops for this.”h]”hŒòThe structure passed is linked into the kernel and may not be destroyed until it has been unregistered. By default, an open() syscall to the device sets file->private_data to point to the structure. Drivers don’t need open in fops for this.”…””}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÛh³ŒZ/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices:4: ./drivers/char/misc.c”h´KÇhj…ubjÜ)”}”(hŒDA zero is returned on success and a negative errno code for failure.”h]”hŒDA zero is returned on success and a negative errno code for failure.”…””}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÛh³ŒZ/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices:4: ./drivers/char/misc.c”h´KÌhj…ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jƒh³j©h´KÂhjubeh}”(h]”h ]”Œ kernelindent”ah"]”h$]”h&]”uh1jÿhh·h²hh³Nh´NubhÌ)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œentries”]”(hØŒmisc_deregister (C function)”Œc.misc_deregister”hNt”auh1hËhh·h²hh³Nh´NubhÝ)”}”(hhh]”(hâ)”}”(hŒ.void misc_deregister (struct miscdevice *misc)”h]”hè)”}”(hŒ-void misc_deregister(struct miscdevice *misc)”h]”(hî)”}”(hŒvoid”h]”hŒvoid”…””}”(hjîh²hh³Nh´Nubah}”(h]”h ]”húah"]”h$]”h&]”uh1híhjêh²hh³ŒZ/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices:4: ./drivers/char/misc.c”h´Mubj)”}”(hŒ ”h]”hŒ ”…””}”(hjýh²hh³Nh´Nubah}”(h]”h ]”j ah"]”h$]”h&]”uh1hÿhjêh²hh³jüh´Mubj)”}”(hŒmisc_deregister”h]”j)”}”(hŒmisc_deregister”h]”hŒmisc_deregister”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”j#ah"]”h$]”h&]”uh1jhj ubah}”(h]”h ]”(j*j+eh"]”h$]”h&]”j/j0uh1jhjêh²hh³jüh´Mubj2)”}”(hŒ(struct miscdevice *misc)”h]”j8)”}”(hŒstruct miscdevice *misc”h]”(j>)”}”(hjAh]”hŒstruct”…””}”(hj+h²hh³Nh´Nubah}”(h]”h ]”jJah"]”h$]”h&]”uh1j=hj'ubj)”}”(hŒ ”h]”hŒ ”…””}”(hj8h²hh³Nh´Nubah}”(h]”h ]”j ah"]”h$]”h&]”uh1hÿhj'ubh)”}”(hhh]”j)”}”(hŒ miscdevice”h]”hŒ miscdevice”…””}”(hjIh²hh³Nh´Nubah}”(h]”h ]”j#ah"]”h$]”h&]”uh1jhjFubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”jtŒreftype”jvŒ reftarget”jKŒmodname”NŒ classname”Njzj})”}”j€]”jƒ)”}”jvjsbŒc.misc_deregister”†”asbuh1hhj'ubj)”}”(hŒ ”h]”hŒ ”…””}”(hjih²hh³Nh´Nubah}”(h]”h ]”j ah"]”h$]”h&]”uh1hÿhj'ubj—)”}”(hjšh]”hŒ*”…””}”(hjwh²hh³Nh´Nubah}”(h]”h ]”j£ah"]”h$]”h&]”uh1j–hj'ubj)”}”(hŒmisc”h]”hŒmisc”…””}”(hj„h²hh³Nh´Nubah}”(h]”h ]”j#ah"]”h$]”h&]”uh1jhj'ubeh}”(h]”h ]”h"]”h$]”h&]”Œnoemph”ˆj/j0uh1j7hj#ubah}”(h]”h ]”h"]”h$]”h&]”j/j0uh1j1hjêh²hh³jüh´Mubeh}”(h]”h ]”h"]”h$]”h&]”j/j0jȈuh1hçjÉjÊhjæh²hh³jüh´Mubah}”(h]”jáah ]”(jÎjÏeh"]”h$]”h&]”jÓˆjÔ)jÕhuh1háh³jüh´Mhjãh²hubj×)”}”(hhh]”jÜ)”}”(hŒ!unregister a miscellaneous device”h]”hŒ!unregister a miscellaneous device”…””}”(hj®h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÛh³ŒZ/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices:4: ./drivers/char/misc.c”h´Mhj«h²hubah}”(h]”h ]”h"]”h$]”h&]”uh1jÖhjãh²hh³jüh´Mubeh}”(h]”h ]”(jtŒfunction”eh"]”h$]”h&]”jùjtjújÆjûjÆjü‰jý‰jþ‰uh1hÜh²hhh·h³Nh´Nubj)”}”(hŒÂ**Parameters** ``struct miscdevice *misc`` device to unregister **Description** Unregister a miscellaneous device that was previously successfully registered with misc_register().”h]”(jÜ)”}”(hŒ**Parameters**”h]”j )”}”(hjÐh]”hŒ Parameters”…””}”(hjÒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjÎubah}”(h]”h ]”h"]”h$]”h&]”uh1jÛh³ŒZ/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices:4: ./drivers/char/misc.c”h´MhjÊubj )”}”(hhh]”j%)”}”(hŒ1``struct miscdevice *misc`` device to unregister ”h]”(j+)”}”(hŒ``struct miscdevice *misc``”h]”j1)”}”(hjïh]”hŒstruct miscdevice *misc”…””}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j0hjíubah}”(h]”h ]”h"]”h$]”h&]”uh1j*h³ŒZ/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices:4: ./drivers/char/misc.c”h´MhjéubjG)”}”(hhh]”jÜ)”}”(hŒdevice to unregister”h]”hŒdevice to unregister”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÛh³jh´Mhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jFhjéubeh}”(h]”h ]”h"]”h$]”h&]”uh1j$h³jh´Mhjæubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjÊubjÜ)”}”(hŒ**Description**”h]”j )”}”(hj*h]”hŒ Description”…””}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj(ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÛh³ŒZ/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices:4: ./drivers/char/misc.c”h´MhjÊubj„)”}”(hŒcUnregister a miscellaneous device that was previously successfully registered with misc_register().”h]”jÜ)”}”(hŒcUnregister a miscellaneous device that was previously successfully registered with misc_register().”h]”hŒcUnregister a miscellaneous device that was previously successfully registered with misc_register().”…””}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÛh³ŒZ/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices:4: ./drivers/char/misc.c”h´Mhj@ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒh³jRh´MhjÊubeh}”(h]”h ]”Œ kernelindent”ah"]”h$]”h&]”uh1jÿhh·h²hh³Nh´Nubeh}”(h]”Œmiscellaneous-devices”ah ]”h"]”Œmiscellaneous devices”ah$]”h&]”uh1hµhhh²hh³hÊh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÊuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hºNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j‹Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”jejbsŒ nametypes”}”je‰sh}”(jbh·hÚhãjájæuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.