Hi,

On 04/26/2014 05:24 PM, alex allss wrote:
> Hans:
> you can take a look recent:
> 
> http://paste.debian.net/95872/

Cool, very good work, thanks for working on this, the
big hurdle to take here was hooking up the rc-core and
you seem to have tackled that nicely. So now we just need
to clean it up a bit and then it can go upstream.

WRT the load / unload problem, one thing which immediately
stood out to me is this bit:

+static int sunxi_ir_remove(struct platform_device *pdev)

...

+       rc_unregister_device(ir->rc);
+       rc_free_device(ir->rc);

rc_unregister_device already frees the device, so you're
freeing it twice. rc_free_device is only there to free
the device if things fail before it is registered (or
if rc_register_device itself fails).

Note btw that you're never calling rc_free_device in the
error handling paths of probe where you should actually
call it :)

Also you're not calling clk_put on the clocks you
of_clk_get. The best thing to do would be to stop using
of_clk_get altogether, and instead use clock-names in the
dts and devm_clk_get.

Likewise you are not unmapping the io mem you map, please
switch to devm_ioremap_resource which will do this
automatically for you on probe failure and on driver unbind
(rmmod).

Similar please use devm_request_irq.

If you use devm everywhere were possible, then the only thing
you need to do on probe error is rc_free_device.

Regards,

Hans





> 
> I need rebase it aganist current mainline
> 
> 
> drvier are checked with LIRC frontend
> 
> yes, problem with OPS after serval reloads
> 
> 
> 
> 2014-04-26 21:21 GMT+06:00 Hans de Goede <[email protected]>:
> 
>> Hi,
>>
>> On 04/26/2014 05:19 PM, alex allss wrote:
>>> I have patch almost ready for mainline, but  I still have some bug with
>>> module reloading.
>>
>> Perhaps you can post / or push it somewhere ? Then maybe someone else will
>> be
>> able to figure out what is causing the module reloading problem.
>>
>> I assume the problem is that things no longer work after an rmmod + insmod
>> ?
>>
>> Regards,
>>
>> Hans
>>
>>>
>>> Also, my old RFC in linux-sunxi mailist.
>>> 26 апр. 2014 г. 21:11 пользователь "Rudi" <[email protected]> написал:
>>>
>>>> Hi,
>>>>
>>>>  Ah I just send a mail about the need to use the rc-core subsys myself,
>> I
>>>>> did not
>>>>> know we already had a driver using that. Do you have a link to the old
>>>>> posting of
>>>>> that driver ? That would be a great starting point for Alexander to get
>>>>> something
>>>>> ready for the mainline (iirc the cir driver was against 3.4 ?)
>>>>>
>>>>
>>>> I carefully put it aside ;-). Find a patch that hooks it into 3.4.79
>> here:
>>>>
>>>> https://github.com/OpenBricks/openbricks/blob/master/config/
>>>> platforms/arm/a10/packages/linux/patches/0002-ir-core-support.diff
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Ruediger "Rudi" Ihle
>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>> Groups
>>>> "linux-sunxi" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>> an
>>>> email to [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "linux-sunxi" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
> 

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to