From patchwork Tue Mar 5 04:53:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2217421 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 CBAD43FCF2 for ; Tue, 5 Mar 2013 05:04:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750734Ab3CEFEI (ORCPT ); Tue, 5 Mar 2013 00:04:08 -0500 Received: from mail-pb0-f49.google.com ([209.85.160.49]:60070 "EHLO mail-pb0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750729Ab3CEFEI (ORCPT ); Tue, 5 Mar 2013 00:04:08 -0500 Received: by mail-pb0-f49.google.com with SMTP id xa12so3911646pbc.36 for ; Mon, 04 Mar 2013 21:04:07 -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 :x-gm-message-state; bh=edMZ+gLe4KuGoU+dr/UTFuZS6+4DxAXXLiNC3Zv0ako=; b=if3bm7SGolv3ni3R/KiJfPymJwmocuR0jCX0wbxctK8nuX0tQLaA4jtrKE0VErx42J ICx8iKagpG5DlmBLtXr6B9nYbGxqVYK3eby/9a057pDRzCmtwaVNPC8G/j4vP64T6TNV zZAKfjpH9DeLfE/Z8cfnMw3oGeVsKQhOzY2kfZkPmz7fdxCjfgT5nhPeCdDgGprBehy2 uLxxx3B0JSxfFUqkKnpxLFi3Qdr2GyA05vAzAvs5dcoDsU9PEYNRcfR53HDwlqJprfG6 L4cD2mskkH/w1IfSyIX0oOUCalH/32GMlQ291HEotc7nl4ijt5/h6fRLuwUz+l3XJLlS SLsA== X-Received: by 10.68.138.197 with SMTP id qs5mr34069607pbb.121.1362459847181; Mon, 04 Mar 2013 21:04:07 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id 1sm25010537pbg.18.2013.03.04.21.04.04 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 04 Mar 2013 21:04:06 -0800 (PST) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: g.liakhovetski@gmx.de, sachin.kamat@linaro.org Subject: [PATCH 1/3] [media] sh_veu: Use module_platform_driver_probe macro Date: Tue, 5 Mar 2013 10:23:36 +0530 Message-Id: <1362459218-13314-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQnYzPa92MsIrvFwt3DNaAfKDw+YIyPIfEXASpVQx+QQcBPGfXs+zpQrT6VyvA7e3G5aABt8 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_veu.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/drivers/media/platform/sh_veu.c b/drivers/media/platform/sh_veu.c index 362d88e..0b32cc3 100644 --- a/drivers/media/platform/sh_veu.c +++ b/drivers/media/platform/sh_veu.c @@ -1249,18 +1249,7 @@ static struct platform_driver __refdata sh_veu_pdrv = { }, }; -static int __init sh_veu_init(void) -{ - return platform_driver_probe(&sh_veu_pdrv, sh_veu_probe); -} - -static void __exit sh_veu_exit(void) -{ - platform_driver_unregister(&sh_veu_pdrv); -} - -module_init(sh_veu_init); -module_exit(sh_veu_exit); +module_platform_driver_probe(sh_veu_pdrv, sh_veu_probe); MODULE_DESCRIPTION("sh-mobile VEU mem2mem driver"); MODULE_AUTHOR("Guennadi Liakhovetski, ");