]> git.baikalelectronics.ru Git - kernel.git/commit
sh_eth: use managed device API
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Thu, 21 Mar 2013 10:41:11 +0000 (10:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Mar 2013 21:20:55 +0000 (17:20 -0400)
commit7cfa2cad4a75abb514f2685c8c9ac1bc8a02a287
treebe37d9a766c93eeffcfbb38b748698cafc236e4a
parentc9a895f4e3c0788b644e86bd6f05873b1651a5ba
sh_eth: use managed device API

Switch the driver to the managed device API by replacing ioremap() calls with
devm_ioremap_resource() (that will also result in calling request_mem_region()
which the driver forgot to do until now) and k[mz]alloc() with devm_kzalloc() --
this permits to simplify driver's probe()/remove() method cleanup. We can now
remove the ioremap() error messages since the error messages are printed by
 devm_ioremap_resource() itself. We can also remove the 'bitbang' field from
'struct sh_eth_private' as we don't need it anymore in order to free the memory
behind it...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c
drivers/net/ethernet/renesas/sh_eth.h