Re: [PATCH 1/2] mfd: omap-usb-host: Remove magic numbers for dev dma mask

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 15, 2012 at 4:47 PM, Felipe Balbi <balbi@xxxxxx> wrote:
> On Wed, Feb 15, 2012 at 03:53:33PM +0530, Govindraj.R wrote:
>> From: "Govindraj.R" <govindraj.raja@xxxxxx>
>>
>> Remove the hardcoded magic values for dma mask and use the dma
>> mask macros available.
>>
>> CC: Felipe Balbi <balbi@xxxxxx>
>> CC: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
>> Signed-off-by: Govindraj.R <govindraj.raja@xxxxxx>
>> ---
>>  drivers/mfd/omap-usb-host.c |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
>> index 68ac2c5..3109b0a 100644
>> --- a/drivers/mfd/omap-usb-host.c
>> +++ b/drivers/mfd/omap-usb-host.c
>> @@ -170,7 +170,7 @@ struct usbhs_hcd_omap {
>>  /*-------------------------------------------------------------------------*/
>>
>>  const char usbhs_driver_name[] = USBHS_DRIVER_NAME;
>> -static u64 usbhs_dmamask = ~(u32)0;
>> +static u64 usbhs_dmamask = DMA_BIT_MASK(32);
>>
>>  /*-------------------------------------------------------------------------*/
>>
>> @@ -223,7 +223,7 @@ static struct platform_device *omap_usbhs_alloc_child(const char *name,
>>       }
>>
>>       child->dev.dma_mask             = &usbhs_dmamask;
>> -     child->dev.coherent_dma_mask    = 0xffffffff;
>> +     child->dev.coherent_dma_mask    = DMA_BIT_MASK(32);
>
> while at that, you could use dma_set_coherent_mask();

Here [1] is the updated patch.

--
Thanks,
Govindraj.R


[1]:

>From c4523f02fe96b85245ada1047aa1273c56509e5c Mon Sep 17 00:00:00 2001
From: "Govindraj.R" <govindraj.raja@xxxxxx>
Date: Wed, 15 Feb 2012 12:27:50 +0530
Subject: [PATCH 1/2] mfd: omap-usb-host: Remove magic numbers for dev dma
 mask

Remove the hardcoded magic values for dma mask and use the dma
mask api/macro available.

Signed-off-by: Govindraj.R <govindraj.raja@xxxxxx>
---
 drivers/mfd/omap-usb-host.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 68ac2c5..6800411 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -170,7 +170,7 @@ struct usbhs_hcd_omap {
 /*-------------------------------------------------------------------------*/

 const char usbhs_driver_name[] = USBHS_DRIVER_NAME;
-static u64 usbhs_dmamask = ~(u32)0;
+static u64 usbhs_dmamask = DMA_BIT_MASK(32);

 /*-------------------------------------------------------------------------*/

@@ -223,7 +223,7 @@ static struct platform_device
*omap_usbhs_alloc_child(const char *name,
 	}

 	child->dev.dma_mask		= &usbhs_dmamask;
-	child->dev.coherent_dma_mask	= 0xffffffff;
+	dma_set_coherent_mask(&child->dev, DMA_BIT_MASK(32));
 	child->dev.parent		= dev;

 	ret = platform_device_add(child);
-- 
1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux