[rt2x00-users] [PATCH 1/2] rt2x00: Use ioremap for SoC devices instead of KSEG1ADDR.

Ivo Van Doorn ivdoorn at gmail.com
Mon Jul 19 16:43:43 AEST 2010


On Mon, Jul 19, 2010 at 7:53 AM, Gertjan van Wingerde
<gwingerde at gmail.com> wrote:
> On 07/18/10 22:17, Helmut Schaa wrote:
>> Am Samstag 17 Juli 2010 schrieb Gertjan van Wingerde:
>>> Make the code a bit more portable to architectures that do not support
>>> KSEG1ADDR.
>>>
>>> Signed-off-by: Gertjan van Wingerde <gwingerde at gmail.com>
>>> ---
>>>
>>> Note: Compile tested only, as I do not own a SOC device.
>>
>> One more thing: I guess we'll need a corresponding call to iounmap as well,
>> somewhere in the uninit code ...
>>
>> Helmut
>
> Good point. Find updated patch attached.
>
> Note: Once you tested this to work properly, I'll submit the patches formally.

I think it should be similar to rt2x00pci:

        if (rt2x00dev->csr.base) {
                iounmap(rt2x00dev->csr.base);
                rt2x00dev->csr.base = NULL;
        }

As far as I know iounmap doesn't check the pointer.

Ivo




More information about the users mailing list