From patchwork Tue Mar 5 04:53:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2217431 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 1EE033FCF2 for ; Tue, 5 Mar 2013 05:04:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750755Ab3CEFEL (ORCPT ); Tue, 5 Mar 2013 00:04:11 -0500 Received: from mail-pb0-f53.google.com ([209.85.160.53]:37211 "EHLO mail-pb0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750729Ab3CEFEK (ORCPT ); Tue, 5 Mar 2013 00:04:10 -0500 Received: by mail-pb0-f53.google.com with SMTP id un1so3890270pbc.12 for ; Mon, 04 Mar 2013 21:04:10 -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=BmUgD4bWHQuIo0WG1BbFZcBs8Cj/rBnvWY6PQCNDSPs=; b=njMyf5RAYy3nDw2A05trKne/k9471g1gvVTVl58NzCa4MfKVdu7pVn7C4TPprHMn6f N8W+oPhZ5sE41V5iQJCMg6YPKG0lXmJhqzSzkcdqXCIRX9a77pW77iZA5dPhMEsdfiJL v72ONRIRRL9yzQzwpBAF7tJX37QRYVzJXGJVG+GZMvux07geOsb2ZJSvNcbQI1AKu3F2 DyR815/nRqOO6XYYlz5itQvdFx4LzgGn4ID9TPl7oqkipumvSDSiI2F72uN8CwqAO3Gb OiYnoIpiA25UR8ognNsH2RcAGTbx+aDfX5VhdGOkpJAIHCpWtE5seZ+S7cbQpKlBALVc LZWg== X-Received: by 10.68.225.99 with SMTP id rj3mr34647383pbc.183.1362459849765; Mon, 04 Mar 2013 21:04:09 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id 1sm25010537pbg.18.2013.03.04.21.04.07 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 04 Mar 2013 21:04:09 -0800 (PST) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: g.liakhovetski@gmx.de, sachin.kamat@linaro.org Subject: [PATCH 2/3] [media] sh_vou: Use module_platform_driver_probe macro Date: Tue, 5 Mar 2013 10:23:37 +0530 Message-Id: <1362459218-13314-2-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: ALoCoQn/muwmhp3b3o3uEj4CEswgoT6wyXUkqBrzJ+45860YOZEjn4w2onwp+/MRsrwj/t4V15ce 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/sh_vou.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/drivers/media/platform/sh_vou.c b/drivers/media/platform/sh_vou.c index 66c8da1..d853162 100644 --- a/drivers/media/platform/sh_vou.c +++ b/drivers/media/platform/sh_vou.c @@ -1485,18 +1485,7 @@ static struct platform_driver __refdata sh_vou = { }, }; -static int __init sh_vou_init(void) -{ - return platform_driver_probe(&sh_vou, sh_vou_probe); -} - -static void __exit sh_vou_exit(void) -{ - platform_driver_unregister(&sh_vou); -} - -module_init(sh_vou_init); -module_exit(sh_vou_exit); +module_platform_driver_probe(sh_vou, sh_vou_probe); MODULE_DESCRIPTION("SuperH VOU driver"); MODULE_AUTHOR("Guennadi Liakhovetski ");