€•ð<Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”(hhŒparent”hubaŒ 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)”…””}”(hhhh2ubah}”(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”…””}”(hhhhFubah}”(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”…””}”(hhhhZubah}”(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”…””}”(hhhhnubah}”(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”…””}”(hhhh‚ubah}”(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ª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”…””}”(hhhhÛ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Œ ”…””}”(hhhhí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”…””}”(hhhjhž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”…””}”(hhhj+hžhhŸNh Nubah}”(h]”h ]”Œk”ah"]”h$]”h&]”uh1j)hj%ubhì)”}”(hŒ ”h]”hŒ ”…””}”(hhhj:hžhhŸNh Nubah}”(h]”h ]”høah"]”h$]”h&]”uh1hëhj%ubh)”}”(hhh]”j)”}”(hŒ miscdevice”h]”hŒ miscdevice”…””}”(hhhjKhž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Œ ”…””}”(hhhjthžhhŸNh Nubah}”(h]”h ]”høah"]”h$]”h&]”uh1hëhj%ubhŒdesc_sig_punctuation”“”)”}”(hŒ*”h]”hŒ*”…””}”(hhhj„hžhhŸNh Nubah}”(h]”h ]”Œp”ah"]”h$]”h&]”uh1j‚hj%ubj)”}”(hŒmisc”h]”hŒmisc”…””}”(hhhj“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”ˆuh1hÍhŸŒZ/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices:4: ./drivers/char/misc.c”h KÒhhÊhžhubhŒ desc_content”“”)”}”(hhh]”hŒ paragraph”“”)”}”(hŒregister a miscellaneous device”h]”hŒregister a miscellaneous device”…””}”(hjÊ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”‰uh1hÈhžhhh£hŸNh NubhŒ container”“”)”}”(hXp**Parameters** ``struct miscdevice *misc`` device structure 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”…””}”(hhhjô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”“”)”}”(hXJ``struct miscdevice *misc`` device structure 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]”(hŒterm”“”)”}”(hŒ``struct miscdevice *misc``”h]”hŒliteral”“”)”}”(hjh]”hŒstruct miscdevice *misc”…””}”(hhhjhž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”…””}”(hj6hj4hž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Ãhj1ubjÇ)”}”(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 ”…””}”(hŒORegister a miscellaneous device with the kernel. If the minor number is set to ”hjChžhhŸNh Nubj)”}”(hŒ``MISC_DYNAMIC_MINOR``”h]”hŒMISC_DYNAMIC_MINOR”…””}”(hhhjLhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjCubhŒ a minor number is assigned and placed in the minor field of the structure. For other cases the minor number requested is used.”…””}”(hŒ a minor number is assigned and placed in the minor field of the structure. For other cases the minor number requested is used.”hjChž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Åhj1ubjÇ)”}”(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.”…””}”(hjhhjfhž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Êhj1ubjÇ)”}”(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.”…””}”(hjwhjuhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÆhŸj.h KÏhj1ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j/hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j hŸj.h KÏhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjê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”…””}”(hhhjµ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Œ ”…””}”(hhhjÄ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”…””}”(hhhjÖ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”…””}”(hhhjòhžhhŸNh Nubah}”(h]”h ]”j6ah"]”h$]”h&]”uh1j)hjîubhì)”}”(hŒ ”h]”hŒ ”…””}”(hhhjÿhžhhŸNh Nubah}”(h]”h ]”høah"]”h$]”h&]”uh1hëhjîubh)”}”(hhh]”j)”}”(hŒ miscdevice”h]”hŒ miscdevice”…””}”(hhhjhžhhŸNh Nubah}”(h]”h ]”jah"]”h$]”h&]”uh1jhj ubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”j`Œreftype”jbŒ reftarget”jŒmodname”NŒ classname”Njfji)”}”jl]”jo)”}”jbjØsbŒc.misc_deregister”†”asbuh1hhjîubhì)”}”(hŒ ”h]”hŒ ”…””}”(hhhj0hžhhŸNh Nubah}”(h]”h ]”høah"]”h$]”h&]”uh1hëhjîubjƒ)”}”(hj†h]”hŒ*”…””}”(hhhj>hžhhŸNh Nubah}”(h]”h ]”jah"]”h$]”h&]”uh1j‚hjîubj)”}”(hŒmisc”h]”hŒmisc”…””}”(hhhjKhžhhŸNh Nubah}”(h]”h ]”jah"]”h$]”h&]”uh1jhjîubeh}”(h]”h ]”h"]”h$]”h&]”Œnoemph”ˆjjuh1j#hjêubah}”(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¿ˆuh1hÍhŸŒZ/var/lib/git/docbuild/linux/Documentation/driver-api/misc_devices:4: ./drivers/char/misc.c”h MhjªhžhubjÂ)”}”(hhh]”jÇ)”}”(hŒ!unregister a miscellaneous device”h]”hŒ!unregister a miscellaneous device”…””}”(hjxhjvhž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 hjshž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ç‰uh1hÈhžhhh£hŸNh Nubjé)”}”(hŒ«**Parameters** ``struct miscdevice *misc`` device to unregister Unregister a miscellaneous device that was previously successfully registered with misc_register().”h]”(jÇ)”}”(hŒ**Parameters**”h]”jó)”}”(hj˜h]”hŒ Parameters”…””}”(hhhjš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Œ•``struct miscdevice *misc`` device to unregister Unregister a miscellaneous device that was previously successfully registered with misc_register().”h]”(j)”}”(hŒ``struct miscdevice *misc``”h]”j)”}”(hj·h]”hŒstruct miscdevice *misc”…””}”(hhhj¹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 M hj±ubj0)”}”(hhh]”(jÇ)”}”(hŒdevice to unregister”h]”hŒdevice to unregister”…””}”(hjÒ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ÍubjÇ)”}”(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().”…””}”(hjáhjßhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÆhŸjÌh M hjÍubeh}”(h]”h ]”h"]”h$]”h&]”uh1j/hj±ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j hŸjÌh M hj®ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj’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”j1Œ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Œ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”‰Œfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œ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”‰Œ embed_images”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”j jsŒ nametypes”}”j Nsh}”(jh£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.