€•>Œ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Œ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Œ ”…””}”(hhíhž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&]”uh1jhhþubah}”(h]”h ]”(Œsig-name”Œdescname”eh"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hühhÕ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)hj%ubhì)”}”(hŒ ”h]”hŒ ”…””}”(hj:hžhhŸNh Nubah}”(h]”h ]”høah"]”h$]”h&]”uh1hëhj%ubh)”}”(hhh]”j)”}”(hŒ miscdevice”h]”hŒ miscdevice”…””}”(hjKhžhhŸNh Nubah}”(h]”h ]”jah"]”h$]”h&]”uh1jhjHubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”Œc”Œreftype”Œ identifier”Œ reftarget”jMŒmodname”NŒ classname”NŒ c:parent_key”Œsphinx.domains.c”Œ LookupKey”“”)”}”Œdata”]”jgŒ ASTIdentifier”“”)”}”jbjsbŒc.misc_register”†”asbuh1hhj%ubhì)”}”(hŒ ”h]”hŒ ”…””}”(hjthžhhŸNh Nubah}”(h]”h ]”høah"]”h$]”h&]”uh1hëhj%ubhŒdesc_sig_punctuation”“”)”}”(hŒ*”h]”hŒ*”…””}”(hj„hžhhŸNh Nubah}”(h]”h ]”Œp”ah"]”h$]”h&]”uh1j‚hj%ubj)”}”(hŒmisc”h]”hŒmisc”…””}”(hj“hžhhŸNh Nubah}”(h]”h ]”jah"]”h$]”h&]”uh1jhj%ubeh}”(h]”h ]”h"]”h$]”h&]”Œnoemph”ˆjjuh1j#hjubah}”(h]”h ]”h"]”h$]”h&]”jjuh1jhhÕhžhhŸhêh K¾ubeh}”(h]”h ]”h"]”h$]”h&]”jjŒ 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 ]”(j`Œfunction”eh"]”h$]”h&]”Œdomain”j`Œ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”“”)”}”(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 KÂhjíubhŒdefinition_list”“”)”}”(hhh]”hŒdefinition_list_item”“”)”}”(hŒ-``struct miscdevice *misc`` device structure ”h]”(hŒterm”“”)”}”(hŒ``struct miscdevice *misc``”h]”hŒliteral”“”)”}”(hjh]”hŒstruct miscdevice *misc”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhŸŒZ/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices:4: ./drivers/char/misc.c”h K¿hjubhŒ definition”“”)”}”(hhh]”jÈ)”}”(hŒdevice structure”h]”hŒdevice structure”…””}”(hj7hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÇhŸj1h K¿hj4ubah}”(h]”h ]”h"]”h$]”h&]”uh1j2hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhŸj1h K¿hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjíubjÈ)”}”(hŒ**Description**”h]”jö)”}”(hjYh]”hŒ Description”…””}”(hj[hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jõhjWubah}”(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Œ 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 ”…””}”(hjuhžhhŸNh Nubj)”}”(hŒ``MISC_DYNAMIC_MINOR``”h]”hŒMISC_DYNAMIC_MINOR”…””}”(hj}hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjuubhŒ a minor number is assigned and placed in the minor field of the structure. For other cases the minor number requested is used.”…””}”(hjuhž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ÀhjqubjÈ)”}”(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ÅhjqubjÈ)”}”(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Êhjqubeh}”(h]”h ]”h"]”h$]”h&]”uh1johŸj•h KÀhjíubeh}”(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 M ubhì)”}”(hŒ ”h]”hŒ ”…””}”(hjéhžhhŸNh Nubah}”(h]”h ]”høah"]”h$]”h&]”uh1hëhjÖhžhhŸjèh M ubhý)”}”(hŒmisc_deregister”h]”j)”}”(hŒmisc_deregister”h]”hŒmisc_deregister”…””}”(hjûhžhhŸNh Nubah}”(h]”h ]”jah"]”h$]”h&]”uh1jhj÷ubah}”(h]”h ]”(jjeh"]”h$]”h&]”jjuh1hühjÖhžhhŸjèh M ubj)”}”(hŒ(struct miscdevice *misc)”h]”j$)”}”(hŒstruct miscdevice *misc”h]”(j*)”}”(hj-h]”hŒstruct”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”j6ah"]”h$]”h&]”uh1j)hjubhì)”}”(hŒ ”h]”hŒ ”…””}”(hj$hžhhŸNh Nubah}”(h]”h ]”høah"]”h$]”h&]”uh1hëhjubh)”}”(hhh]”j)”}”(hŒ miscdevice”h]”hŒ miscdevice”…””}”(hj5hžhhŸNh Nubah}”(h]”h ]”jah"]”h$]”h&]”uh1jhj2ubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”j`Œreftype”jbŒ reftarget”j7Œmodname”NŒ classname”Njfji)”}”jl]”jo)”}”jbjýsbŒc.misc_deregister”†”asbuh1hhjubhì)”}”(hŒ ”h]”hŒ ”…””}”(hjUhžhhŸNh Nubah}”(h]”h ]”høah"]”h$]”h&]”uh1hëhjubjƒ)”}”(hj†h]”hŒ*”…””}”(hjchžhhŸNh Nubah}”(h]”h ]”jah"]”h$]”h&]”uh1j‚hjubj)”}”(hŒmisc”h]”hŒmisc”…””}”(hjphžhhŸNh Nubah}”(h]”h ]”jah"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”Œnoemph”ˆjjuh1j#hjubah}”(h]”h ]”h"]”h$]”h&]”jjuh1jhjÖhžhhŸjèh M ubeh}”(h]”h ]”h"]”h$]”h&]”jjj´ˆuh1hÓjµj¶hjÒhžhhŸjèh M ubah}”(h]”jÍah ]”(jºj»eh"]”h$]”h&]”j¿ˆjÀ)jÁhuh1hÍhŸjèh M hjÏ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 M hj—hžhubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÏhžhhŸjèh M ubeh}”(h]”h ]”(j`Œfunction”eh"]”h$]”h&]”jåj`jæ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]”j)”}”(hjÛh]”hŒstruct miscdevice *misc”…””}”(hjÝhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjÙubah}”(h]”h ]”h"]”h$]”h&]”uh1jhŸŒZ/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices:4: ./drivers/char/misc.c”h MhjÕubj3)”}”(hhh]”jÈ)”}”(hŒdevice to unregister”h]”hŒdevice to unregister”…””}”(hjôhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÇhŸjðh Mhjñubah}”(h]”h ]”h"]”h$]”h&]”uh1j2hjÕubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhŸjðh MhjÒubah}”(h]”h ]”h"]”h$]”h&]”uh1j hj¶ubjÈ)”}”(hŒ**Description**”h]”jö)”}”(hjh]”hŒ Description”…””}”(hjhž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 Mhj¶ubjp)”}”(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().”…””}”(hj0hž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&]”uh1johŸj>h 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”jwŒ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”}”jQjNsŒ nametypes”}”jQ‰sh}”(jNh£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.