From patchwork Tue Mar 5 04:53:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2217441 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id F25F23FCF2 for ; Tue, 5 Mar 2013 05:04:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750767Ab3CEFEO (ORCPT ); Tue, 5 Mar 2013 00:04:14 -0500 Received: from mail-pb0-f41.google.com ([209.85.160.41]:54816 "EHLO mail-pb0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750729Ab3CEFEN (ORCPT ); Tue, 5 Mar 2013 00:04:13 -0500 Received: by mail-pb0-f41.google.com with SMTP id um15so3926824pbc.14 for ; Mon, 04 Mar 2013 21:04:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=pBewsoEVKpsMlF0BMehsWt2dlYqFWHjCW6xj9OG1K1U=; b=YACVn3ADSJAdh/XAn2czT2j6F+xnj8MOXg/8mM15bukEakgnAi0uiBlPQFRij5mfeG thVFb55D4WjiSNNwpZ2o9NkJhzf4efYhj/yhPmK5nWreHhX775pCLaiZtc4ICryOlVcA cxLYGNTu82J+Px7Af7tF6NYNEoWLGeA7aBS+2wX5fr3sQTOhN9E8SE5iMe8x4P6K7NbL tUwiBADU+TdV+Ag0qd7seJuBVXfwZWxah4ryMZYEfC1WNG2qk12yJbu8AEC5V6hqZkF7 ygsWOZJuZU9Adoe+E+s0iUOAqUOaAcYyFPsbqVIJ3q9r3jUKGqkgYgDAlpj0ClcToyL2 O9Zw== X-Received: by 10.68.7.163 with SMTP id k3mr13098922pba.141.1362459852188; Mon, 04 Mar 2013 21:04:12 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id 1sm25010537pbg.18.2013.03.04.21.04.10 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 04 Mar 2013 21:04:11 -0800 (PST) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: g.liakhovetski@gmx.de, sachin.kamat@linaro.org Subject: [PATCH 3/3] [media] soc_camera/mx1_camera: Use module_platform_driver_probe macro Date: Tue, 5 Mar 2013 10:23:38 +0530 Message-Id: <1362459218-13314-3-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1362459218-13314-1-git-send-email-sachin.kamat@linaro.org> References: <1362459218-13314-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQlhHBuWcFjvyKMjhjulDJH7bEt7SECua7nCnax+Rt7DapkGl7dFQ7yagMW7pzlI8y1Ncpfr Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org module_platform_driver_probe() eliminates the boilerplate and simplifies the code. Signed-off-by: Sachin Kamat --- drivers/media/platform/soc_camera/mx1_camera.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/drivers/media/platform/soc_camera/mx1_camera.c b/drivers/media/platform/soc_camera/mx1_camera.c index 25b2a28..4389f43 100644 --- a/drivers/media/platform/soc_camera/mx1_camera.c +++ b/drivers/media/platform/soc_camera/mx1_camera.c @@ -859,18 +859,7 @@ static struct platform_driver mx1_camera_driver = { .remove = __exit_p(mx1_camera_remove), }; -static int __init mx1_camera_init(void) -{ - return platform_driver_probe(&mx1_camera_driver, mx1_camera_probe); -} - -static void __exit mx1_camera_exit(void) -{ - return platform_driver_unregister(&mx1_camera_driver); -} - -module_init(mx1_camera_init); -module_exit(mx1_camera_exit); +module_platform_driver_probe(mx1_camera_driver, mx1_camera_probe); MODULE_DESCRIPTION("i.MX1/i.MXL SoC Camera Host driver"); MODULE_AUTHOR("Paulius Zaleckas ");