lkml.org 
[lkml]   [2016]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4/4] mailbox: mailbox-test: add support for separate tx/rx buffer with single channel
From
Date


On 12/02/16 09:15, Lee Jones wrote:
> On Thu, 11 Feb 2016, Sudeep Holla wrote:
>

[...]

>> @@ -294,9 +295,13 @@ static int mbox_test_probe(struct platform_device *pdev)
>>
>> /* It's okay for MMIO to be NULL */
>> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> - tdev->mmio = devm_ioremap_resource(&pdev->dev, res);
>> - if (IS_ERR(tdev->mmio))
>> - tdev->mmio = NULL;
>> + tdev->tx_mmio = devm_ioremap_resource(&pdev->dev, res);
>> + if (IS_ERR(tdev->tx_mmio))
>> + tdev->tx_mmio = NULL;
>
> Nit: I'd prefer to see a new line separator here.
>

OK will add it

>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
>> + tdev->rx_mmio = devm_ioremap_resource(&pdev->dev, res);
>> + if (IS_ERR(tdev->rx_mmio))
>> + tdev->rx_mmio = tdev->tx_mmio;
>>
>> tdev->tx_channel = mbox_test_request_channel(pdev, "tx");
>> tdev->rx_channel = mbox_test_request_channel(pdev, "rx");
>> @@ -304,6 +309,9 @@ static int mbox_test_probe(struct platform_device *pdev)
>> if (!tdev->tx_channel && !tdev->rx_channel)
>> return -EPROBE_DEFER;
>>
>> + if (!tdev->rx_channel && (tdev->rx_mmio != tdev->tx_mmio))
>> + tdev->rx_channel = tdev->tx_channel;
>> +
>> tdev->dev = &pdev->dev;
>> platform_set_drvdata(pdev, tdev);
>
> Otherwise code looks good. Nice extension.
>

Thanks for the review.

> Acked-by: Lee Jones <lee.jones@linaro.org>
>

--
Regards,
Sudeep

\
 
 \ /
  Last update: 2016-02-12 11:01    [W:0.080 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site