From patchwork Wed Nov 16 20:49:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 9432705 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1725E60755 for ; Wed, 16 Nov 2016 20:50:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0974129143 for ; Wed, 16 Nov 2016 20:50:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F22162915C; Wed, 16 Nov 2016 20:50:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 379B429156 for ; Wed, 16 Nov 2016 20:50:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934956AbcKPUuK (ORCPT ); Wed, 16 Nov 2016 15:50:10 -0500 Received: from resqmta-po-12v.sys.comcast.net ([96.114.154.171]:42715 "EHLO resqmta-po-12v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936101AbcKPUuI (ORCPT ); Wed, 16 Nov 2016 15:50:08 -0500 Received: from resomta-po-09v.sys.comcast.net ([96.114.154.233]) by resqmta-po-12v.sys.comcast.net with SMTP id 778rc9a06lHMY779ecnnnu; Wed, 16 Nov 2016 20:50:02 +0000 Received: from mail.gonehiking.org ([73.181.52.62]) by resomta-po-09v.sys.comcast.net with SMTP id 779cc5JzsmPUL779dc24Hz; Wed, 16 Nov 2016 20:50:02 +0000 Received: from localhost.localdomain (shuah-xps.internal [192.168.1.87]) by mail.gonehiking.org (Postfix) with ESMTP id 760F29F30D; Wed, 16 Nov 2016 13:50:00 -0700 (MST) From: Shuah Khan To: mchehab@kernel.org Cc: Shuah Khan , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: remove obsolete Media Device Managed resource interfaces Date: Wed, 16 Nov 2016 13:49:50 -0700 Message-Id: <20161116204950.29400-1-shuahkh@osg.samsung.com> X-Mailer: git-send-email 2.9.3 X-CMAE-Envelope: MS4wfA/mhNmLUNkLvkRe17xTIDwGvgw9VonoNkDr2mmW4c1kn9sdeu66lZtZt07pcONxreom/j1adErPBg0RSBrLhUGmYuVk4kDLvebQ3jAkhfXKOJqJn3wp aCHVQ31AoPnmH3yWpzwlmFV2++iuQNZqSV9MGFTxSfCXdTjOvO8m7egEsVQNcbrkabrpHT4U39Ib8NLeMPnjDwuVolOxqxktXj96aSlW0GO1X8LUaSONocig VYgmmOJhkxRrTbvs4xRk8QftZVyv/pKqWUtAljwI0Z3RJ+VC9jq8xv+DoerozjUo Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove obsolete media_device_get_devres(), media_device_find_devres(), and media_device_release_devres() interfaces. These interfaces are now obsolete. Signed-off-by: Shuah Khan --- drivers/media/media-device.c | 26 -------------------------- include/media/media-device.h | 32 -------------------------------- 2 files changed, 58 deletions(-) diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index 2783531..5b67267 100644 --- a/drivers/media/media-device.c +++ b/drivers/media/media-device.c @@ -817,32 +817,6 @@ void media_device_unregister(struct media_device *mdev) } EXPORT_SYMBOL_GPL(media_device_unregister); -static void media_device_release_devres(struct device *dev, void *res) -{ -} - -struct media_device *media_device_get_devres(struct device *dev) -{ - struct media_device *mdev; - - mdev = devres_find(dev, media_device_release_devres, NULL, NULL); - if (mdev) - return mdev; - - mdev = devres_alloc(media_device_release_devres, - sizeof(struct media_device), GFP_KERNEL); - if (!mdev) - return NULL; - return devres_get(dev, mdev, NULL, NULL); -} -EXPORT_SYMBOL_GPL(media_device_get_devres); - -struct media_device *media_device_find_devres(struct device *dev) -{ - return devres_find(dev, media_device_release_devres, NULL, NULL); -} -EXPORT_SYMBOL_GPL(media_device_find_devres); - #if IS_ENABLED(CONFIG_PCI) void media_device_pci_init(struct media_device *mdev, struct pci_dev *pci_dev, diff --git a/include/media/media-device.h b/include/media/media-device.h index ef93e21..633f2e3 100644 --- a/include/media/media-device.h +++ b/include/media/media-device.h @@ -373,30 +373,6 @@ int __must_check media_device_register_entity_notify(struct media_device *mdev, void media_device_unregister_entity_notify(struct media_device *mdev, struct media_entity_notify *nptr); -/** - * media_device_get_devres() - get media device as device resource - * creates if one doesn't exist - * - * @dev: pointer to struct &device. - * - * Sometimes, the media controller &media_device needs to be shared by more - * than one driver. This function adds support for that, by dynamically - * allocating the &media_device and allowing it to be obtained from the - * struct &device associated with the common device where all sub-device - * components belong. So, for example, on an USB device with multiple - * interfaces, each interface may be handled by a separate per-interface - * drivers. While each interface have its own &device, they all share a - * common &device associated with the hole USB device. - */ -struct media_device *media_device_get_devres(struct device *dev); - -/** - * media_device_find_devres() - find media device as device resource - * - * @dev: pointer to struct &device. - */ -struct media_device *media_device_find_devres(struct device *dev); - /* Iterate over all entities. */ #define media_device_for_each_entity(entity, mdev) \ list_for_each_entry(entity, &(mdev)->entities, graph_obj.list) @@ -474,14 +450,6 @@ static inline void media_device_unregister_entity_notify( struct media_entity_notify *nptr) { } -static inline struct media_device *media_device_get_devres(struct device *dev) -{ - return NULL; -} -static inline struct media_device *media_device_find_devres(struct device *dev) -{ - return NULL; -} static inline void media_device_pci_init(struct media_device *mdev, struct pci_dev *pci_dev,