From patchwork Mon Feb 1 18:18:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ameya Palande X-Patchwork-Id: 76131 X-Patchwork-Delegate: omar.ramirez@ti.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o11IIZrR012510 for ; Mon, 1 Feb 2010 18:18:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755243Ab0BASSf (ORCPT ); Mon, 1 Feb 2010 13:18:35 -0500 Received: from smtp.nokia.com ([192.100.122.230]:38367 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755205Ab0BASSe (ORCPT ); Mon, 1 Feb 2010 13:18:34 -0500 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o11IIQgp019461; Mon, 1 Feb 2010 20:18:27 +0200 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 1 Feb 2010 20:18:26 +0200 Received: from mgw-da01.ext.nokia.com ([147.243.128.24]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Mon, 1 Feb 2010 20:18:26 +0200 Received: from localhost.localdomain (esdhcp041217.research.nokia.com [172.21.41.217]) by mgw-da01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o11IIM7p018233; Mon, 1 Feb 2010 20:18:23 +0200 From: Ameya Palande To: omar.ramirez@ti.com Cc: nm@ti.com, linux-omap@vger.kernel.org, deepak.chitriki@ti.com Subject: [PATCH] DSPBRIDGE: Get rid of driver_minor global variable Date: Mon, 1 Feb 2010 20:18:04 +0200 Message-Id: <8a14e4992a92e3bc31d518ca71b14f214cf0f764.1265048264.git.ameya.palande@nokia.com> X-Mailer: git-send-email 1.6.3.3 X-OriginalArrivalTime: 01 Feb 2010 18:18:26.0426 (UTC) FILETIME=[F286C5A0:01CAA36A] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 01 Feb 2010 18:18:35 +0000 (UTC) diff --git a/drivers/dsp/bridge/rmgr/drv_interface.c b/drivers/dsp/bridge/rmgr/drv_interface.c index a02a32a..de79f26 100644 --- a/drivers/dsp/bridge/rmgr/drv_interface.c +++ b/drivers/dsp/bridge/rmgr/drv_interface.c @@ -93,7 +93,6 @@ static u32 driverContext; static char *GT_str; #endif /* CONFIG_BRIDGE_DEBUG */ static s32 driver_major; -static s32 driver_minor; static char *base_img; char *iva_img; static s32 shm_size = 0x500000; /* 5 MB */ @@ -236,7 +235,7 @@ static int __devinit omap34xx_bridge_probe(struct platform_device *pdev) omap_dspbridge_dev = pdev; /* use 2.6 device model */ - result = alloc_chrdev_region(&dev, driver_minor, 1, driver_name); + result = alloc_chrdev_region(&dev, 0, 1, driver_name); if (result < 0) { GT_1trace(driverTrace, GT_7CLASS, "bridge_init: " "Can't get Major %d \n", driver_major); @@ -268,7 +267,7 @@ static int __devinit omap34xx_bridge_probe(struct platform_device *pdev) GT_0trace(driverTrace, GT_7CLASS, "Error creating bridge class \n"); - device_create(bridge_class, NULL, MKDEV(driver_major, driver_minor), + device_create(bridge_class, NULL, MKDEV(driver_major, 0), NULL, "DspBridge"); GT_init(); @@ -428,7 +427,7 @@ func_cont: SERVICES_Exit(); GT_exit(); - devno = MKDEV(driver_major, driver_minor); + devno = MKDEV(driver_major, 0); if (bridge_device) { cdev_del(&bridge_device->cdev); kfree(bridge_device); @@ -436,7 +435,7 @@ func_cont: unregister_chrdev_region(devno, 1); if (bridge_class) { /* remove the device from sysfs */ - device_destroy(bridge_class, MKDEV(driver_major, driver_minor)); + device_destroy(bridge_class, MKDEV(driver_major, 0)); class_destroy(bridge_class); }