[PATCH] hwrng: pasemi_rng.c: Migrate to managed API

2016-08-25 Thread PrasannaKumar Muralidharan
Use devm_ioremap and devm_hwrng_register instead of ioremap and hwrng_register. This removes unregistering and error handling code. This patch is not tested with hardware as I don't have access to it. Signed-off-by: PrasannaKumar Muralidharan --- drivers/char/hw_random/pasemi-rng.c | 26 +++

Re: hwrng: pasemi_rng.c: Migrate to managed API

2016-08-29 Thread Darren Stevens
Hello PrasannaKumar On 25/08/2016, PrasannaKumar Muralidharan wrote: >> I will propose to use devm_ioremap_resource() instead for removing this >> hardcoded 0x100, but i cannot find any user of this driver in any dts. >> (And so cannot check that this 0x100 is given in any DT resource node) > >> I

Re: hwrng: pasemi_rng.c: Migrate to managed API

2016-08-30 Thread PrasannaKumar Muralidharan
Hi Darren, >> I wanted to use devm_ioremap_resource but could not find DT entry >> required for this driver in any of the .dts files. So did not change >> that. I could not find any dts/dtsi for this platform. So I assume >> that the dtb is not present in the kernel, dtb is supplied by the >> boot

Re: hwrng: pasemi_rng.c: Migrate to managed API

2016-08-31 Thread Darren Stevens
Hello PrasannaKumar On 30/08/2016, PrasannaKumar Muralidharan wrote: > Hi Darren, >> On mine (Amigaone X1000) that is correct, we boot linux with a vmlinux >> file, and the bootloader (CFE) passes a fixed dtb. I think it is >> possible to dump the tree from inside CFE, if it would help I can >> in

Re: hwrng: pasemi_rng.c: Migrate to managed API

2016-09-01 Thread PrasannaKumar Muralidharan
> I didn't explain well, There is a CFE command 'show devtree' here's the > relevant bits (I Hope) This is much simple than I expected. > [CFE ]CFE> show devtree > [/] > | #interrupt-cells val 0x0002 > | #address-cells val 0x0002 > | #size-cells

Re: [PATCH] hwrng: pasemi_rng.c: Migrate to managed API

2016-08-25 Thread LABBE Corentin
On Thu, Aug 25, 2016 at 05:04:16PM +0530, PrasannaKumar Muralidharan wrote: > Use devm_ioremap and devm_hwrng_register instead of ioremap and > hwrng_register. This removes unregistering and error handling code. > > This patch is not tested with hardware as I don't have access to it. > > Signed-o

Re: [PATCH] hwrng: pasemi_rng.c: Migrate to managed API

2016-08-25 Thread PrasannaKumar Muralidharan
> I will propose to use devm_ioremap_resource() instead for removing this > hardcoded 0x100, but i cannot find any user of this driver in any dts. (And > so cannot check that this 0x100 is given in any DT resource node) > > Is this normal ? I wanted to use devm_ioremap_resource but could not fin

[PATCH v2] hwrng: pasemi_rng.c: Migrate to managed API

2016-09-04 Thread PrasannaKumar Muralidharan
Use devm_ioremap and devm_hwrng_register instead of ioremap and hwrng_register. This removes unregistering and error handling code. Changes in v2: Remove hardcoded resource size in ioremap, use resource struct obtained by calling platform_get_resource. Removing hardcoded resource size was suggest

Re: [PATCH v2] hwrng: pasemi_rng.c: Migrate to managed API

2016-09-07 Thread Herbert Xu
On Sun, Sep 04, 2016 at 11:43:08PM +0530, PrasannaKumar Muralidharan wrote: > Use devm_ioremap and devm_hwrng_register instead of ioremap and > hwrng_register. This removes unregistering and error handling code. > > Changes in v2: > Remove hardcoded resource size in ioremap, use resource struct ob