From patchwork Wed Dec 16 17:11:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 7864011 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D83F2BEEE1 for ; Wed, 16 Dec 2015 17:11:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C43DC203C2 for ; Wed, 16 Dec 2015 17:11:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A3952202F8 for ; Wed, 16 Dec 2015 17:11:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965954AbbLPRLl (ORCPT ); Wed, 16 Dec 2015 12:11:41 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:41340 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934294AbbLPRLh (ORCPT ); Wed, 16 Dec 2015 12:11:37 -0500 Received: from [191.33.142.179] (helo=smtp.w2.samsung.com) by bombadil.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1a9Fc0-0007Bz-QE; Wed, 16 Dec 2015 17:11:37 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.86) (envelope-from ) id 1a9Fbg-0005Lm-Nr; Wed, 16 Dec 2015 15:11:16 -0200 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab Subject: [PATCH 1/5] [media] move documentation to the header files Date: Wed, 16 Dec 2015 15:11:11 -0200 Message-Id: <6c927d1218bd10ccb3a0e8d727e153f0b5798603.1450285867.git.mchehab@osg.samsung.com> X-Mailer: git-send-email 2.5.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some exported functions were still documented at the .c file, instead of documenting at the .h one. Move the documentation to the right place, as we only use headers at media device-drivers.xml DocBook. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/media-device.c | 37 ------------------------------------- drivers/media/media-entity.c | 13 ------------- include/media/media-device.h | 6 ++++++ include/media/media-entity.h | 18 ++++++++++++++++-- 4 files changed, 22 insertions(+), 52 deletions(-) diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index 49dd41cd047f..3e0227555196 100644 --- a/drivers/media/media-device.c +++ b/drivers/media/media-device.c @@ -577,13 +577,6 @@ int __must_check media_device_register_entity(struct media_device *mdev, } EXPORT_SYMBOL_GPL(media_device_register_entity); -/** - * media_device_unregister_entity - Unregister an entity - * @entity: The entity - * - * If the entity has never been registered this function will return - * immediately. - */ static void __media_device_unregister_entity(struct media_entity *entity) { struct media_device *mdev = entity->graph_obj.mdev; @@ -627,17 +620,6 @@ void media_device_unregister_entity(struct media_entity *entity) } EXPORT_SYMBOL_GPL(media_device_unregister_entity); - -/** - * media_device_init() - initialize a media device - * @mdev: The media device - * - * The caller is responsible for initializing the media device before - * registration. The following fields must be set: - * - * - dev must point to the parent device - * - model must be filled with the device model name - */ int __must_check media_device_init(struct media_device *mdev) { if (WARN_ON(mdev->dev == NULL)) @@ -657,11 +639,6 @@ int __must_check media_device_init(struct media_device *mdev) } EXPORT_SYMBOL_GPL(media_device_init); -/** - * media_device_cleanup() - Cleanup a media device - * @mdev: The media device - * - */ void media_device_cleanup(struct media_device *mdev) { ida_destroy(&mdev->entity_internal_idx); @@ -670,13 +647,6 @@ void media_device_cleanup(struct media_device *mdev) } EXPORT_SYMBOL_GPL(media_device_cleanup); -/** - * __media_device_register() - register a media device - * @mdev: The media device - * @owner: The module owner - * - * returns zero on success or a negative error code. - */ int __must_check __media_device_register(struct media_device *mdev, struct module *owner) { @@ -706,13 +676,6 @@ int __must_check __media_device_register(struct media_device *mdev, } EXPORT_SYMBOL_GPL(__media_device_register); -/** - * media_device_unregister - unregister a media device - * @mdev: The media device - * - * It is safe to call this function on an unregistered - * (but initialised) media device. - */ void media_device_unregister(struct media_device *mdev) { struct media_entity *entity; diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c index 32a5f8cae72d..a2d28162213e 100644 --- a/drivers/media/media-entity.c +++ b/drivers/media/media-entity.c @@ -70,14 +70,6 @@ static inline const char *intf_type(struct media_interface *intf) } }; -/** - * __media_entity_enum_init - Initialise an entity enumeration - * - * @ent_enum: Entity enumeration to be initialised - * @idx_max: Maximum number of entities in the enumeration - * - * Returns zero on success or a negative error code. - */ __must_check int __media_entity_enum_init(struct media_entity_enum *ent_enum, int idx_max) { @@ -93,11 +85,6 @@ __must_check int __media_entity_enum_init(struct media_entity_enum *ent_enum, } EXPORT_SYMBOL_GPL(__media_entity_enum_init); -/** - * media_entity_enum_cleanup - Release resources of an entity enumeration - * - * @e: Entity enumeration to be released - */ void media_entity_enum_cleanup(struct media_entity_enum *ent_enum) { kfree(ent_enum->bmap); diff --git a/include/media/media-device.h b/include/media/media-device.h index ded71f60d193..4b900c9c5cdd 100644 --- a/include/media/media-device.h +++ b/include/media/media-device.h @@ -428,6 +428,8 @@ void media_device_cleanup(struct media_device *mdev); * a sysfs attribute. * * Unregistering a media device that hasn't been registered is *NOT* safe. + * + * Return: returns zero on success or a negative error code. */ int __must_check __media_device_register(struct media_device *mdev, struct module *owner); @@ -437,6 +439,10 @@ int __must_check __media_device_register(struct media_device *mdev, * __media_device_unregister() - Unegisters a media device element * * @mdev: pointer to struct &media_device + * + * + * It is safe to call this function on an unregistered (but initialised) + * media device. */ void media_device_unregister(struct media_device *mdev); diff --git a/include/media/media-entity.h b/include/media/media-entity.h index f915ed62ac81..c4aaeb85229c 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h @@ -370,9 +370,23 @@ static inline bool is_media_entity_v4l2_subdev(struct media_entity *entity) } } +/** + * __media_entity_enum_init - Initialise an entity enumeration + * + * @ent_enum: Entity enumeration to be initialised + * @idx_max: Maximum number of entities in the enumeration + * + * Return: Returns zero on success or a negative error code. + */ __must_check int __media_entity_enum_init(struct media_entity_enum *ent_enum, int idx_max); -void media_entity_enum_cleanup(struct media_entity_enum *e); + +/** + * media_entity_enum_cleanup - Release resources of an entity enumeration + * + * @ent_enum: Entity enumeration to be released + */ +void media_entity_enum_cleanup(struct media_entity_enum *ent_enum); /** * media_entity_enum_zero - Clear the entire enum @@ -847,6 +861,7 @@ void media_remove_intf_link(struct media_link *link); * Note: this is an unlocked version of media_remove_intf_links(). */ void __media_remove_intf_links(struct media_interface *intf); + /** * media_remove_intf_links() - remove all links associated with an interface * @@ -861,7 +876,6 @@ void __media_remove_intf_links(struct media_interface *intf); */ void media_remove_intf_links(struct media_interface *intf); - #define media_entity_call(entity, operation, args...) \ (((entity)->ops && (entity)->ops->operation) ? \ (entity)->ops->operation((entity) , ##args) : -ENOIOCTLCMD)