All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	Jonathan Corbet <corbet@lwn.net>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v6 01/16] parport: fix a kernel-doc markup
Date: Thu, 14 Jan 2021 09:04:37 +0100	[thread overview]
Message-ID: <dc0778af8c466cc667409ead05876a5cfd3cbece.1610610937.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1610610937.git.mchehab+huawei@kernel.org>

The kernel-doc markup inside share.c is actually for
__parport_register_driver. The actual goal seems to be
to document parport_register_driver().

So, fix the existing markup and add a new one.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/parport/share.c |  2 +-
 include/linux/parport.h | 31 +++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/drivers/parport/share.c b/drivers/parport/share.c
index 7fec4fefe151..62f8407923d4 100644
--- a/drivers/parport/share.c
+++ b/drivers/parport/share.c
@@ -243,7 +243,7 @@ static int port_detect(struct device *dev, void *dev_drv)
 }
 
 /**
- *	parport_register_driver - register a parallel port device driver
+ *	__parport_register_driver - register a parallel port device driver
  *	@drv: structure describing the driver
  *	@owner: owner module of drv
  *	@mod_name: module name string
diff --git a/include/linux/parport.h b/include/linux/parport.h
index 1fb508c19e83..f981f794c850 100644
--- a/include/linux/parport.h
+++ b/include/linux/parport.h
@@ -297,6 +297,37 @@ int __must_check __parport_register_driver(struct parport_driver *,
  * parport_register_driver must be a macro so that KBUILD_MODNAME can
  * be expanded
  */
+
+/**
+ *	parport_register_driver - register a parallel port device driver
+ *	@driver: structure describing the driver
+ *
+ *	This can be called by a parallel port device driver in order
+ *	to receive notifications about ports being found in the
+ *	system, as well as ports no longer available.
+ *
+ *	If devmodel is true then the new device model is used
+ *	for registration.
+ *
+ *	The @driver structure is allocated by the caller and must not be
+ *	deallocated until after calling parport_unregister_driver().
+ *
+ *	If using the non device model:
+ *	The driver's attach() function may block.  The port that
+ *	attach() is given will be valid for the duration of the
+ *	callback, but if the driver wants to take a copy of the
+ *	pointer it must call parport_get_port() to do so.  Calling
+ *	parport_register_device() on that port will do this for you.
+ *
+ *	The driver's detach() function may block.  The port that
+ *	detach() is given will be valid for the duration of the
+ *	callback, but if the driver wants to take a copy of the
+ *	pointer it must call parport_get_port() to do so.
+ *
+ *
+ *	Returns 0 on success. The non device model will always succeeds.
+ *	but the new device model can fail and will return the error code.
+ **/
 #define parport_register_driver(driver)             \
 	__parport_register_driver(driver, THIS_MODULE, KBUILD_MODNAME)
 
-- 
2.29.2


  reply	other threads:[~2021-01-14  8:07 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14  8:04 [PATCH v6 00/16] Fix several bad kernel-doc markups Mauro Carvalho Chehab
2021-01-14  8:04 ` Mauro Carvalho Chehab
2021-01-14  8:04 ` Mauro Carvalho Chehab [this message]
2021-01-14  8:04 ` [PATCH v6 02/16] rapidio: fix kernel-doc a markup Mauro Carvalho Chehab
2021-01-14  8:04 ` [PATCH v6 03/16] fs: fix kernel-doc markups Mauro Carvalho Chehab
2021-01-14  8:04 ` [PATCH v6 04/16] pstore/zone: fix a kernel-doc markup Mauro Carvalho Chehab
2021-01-14  8:04 ` [PATCH v6 05/16] firmware: stratix10-svc: fix kernel-doc markups Mauro Carvalho Chehab
2021-01-14  8:04 ` [PATCH v6 06/16] connector: fix a kernel-doc markup Mauro Carvalho Chehab
2021-01-14  8:04 ` [PATCH v6 07/16] lib/crc7: " Mauro Carvalho Chehab
2021-01-14  8:04 ` [PATCH v6 08/16] memblock: fix kernel-doc markups Mauro Carvalho Chehab
2021-01-14  8:04 ` [PATCH v6 09/16] w1: fix a kernel-doc markup Mauro Carvalho Chehab
2021-01-14  8:04 ` [PATCH v6 10/16] selftests: kselftest_harness.h: partially fix kernel-doc markups Mauro Carvalho Chehab
2021-01-14  8:04 ` [PATCH v6 11/16] scripts: kernel-doc: validate kernel-doc markup with the actual names Mauro Carvalho Chehab
2021-01-14 10:11   ` kernel test robot
2021-01-14 10:11     ` kernel test robot
2021-01-14 10:16   ` kernel test robot
2021-01-14 10:16     ` kernel test robot
2021-01-18 20:35   ` Jonathan Corbet
2021-01-19  7:43     ` Mauro Carvalho Chehab
2021-01-14  8:04 ` [PATCH v6 12/16] net: tip: fix a couple kernel-doc markups Mauro Carvalho Chehab
2021-01-14 15:59   ` Jon Maloy
2021-01-14 18:34     ` Jakub Kicinski
2021-01-14 21:22       ` Johannes Berg
2021-01-14  8:04 ` [PATCH v6 13/16] net: cfg80211: fix a kerneldoc markup Mauro Carvalho Chehab
2021-01-14  8:04 ` [PATCH v6 14/16] reset: core: fix a kernel-doc markup Mauro Carvalho Chehab
2021-01-14  8:25   ` Philipp Zabel
2021-01-14  8:04 ` [PATCH v6 15/16] drm: drm_crc: " Mauro Carvalho Chehab
2021-01-14  8:04   ` Mauro Carvalho Chehab
2021-01-14  8:06   ` Simon Ser
2021-01-14  8:06     ` Simon Ser
2021-01-14 14:13     ` Simon Ser
2021-01-14 14:13       ` Simon Ser
2021-01-14  8:04 ` [PATCH v6 16/16] platform/surface: aggregator: " Mauro Carvalho Chehab
2021-01-14 14:53   ` Maximilian Luz
2021-01-18 18:20   ` Hans de Goede
2021-01-21 19:09 ` [PATCH v6 00/16] Fix several bad kernel-doc markups Jonathan Corbet
2021-01-21 19:09   ` Jonathan Corbet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dc0778af8c466cc667409ead05876a5cfd3cbece.1610610937.git.mchehab+huawei@kernel.org \
    --to=mchehab+huawei@kernel.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.