EDAC, altera: Simplify calculation of total memory
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Tue, 6 Jun 2017 23:54:59 +0000 (11:54 +1200)
committerBorislav Petkov <bp@suse.de>
Wed, 14 Jun 2017 11:49:25 +0000 (13:49 +0200)
commitff0abed4922ffbd40dc4e5a78b8ea56a5eb68ec7
tree1a97df13f1d384c0660cf115dcc53bb49bf0019e
parent133e4455c9b49071906775319e2e6d083a4f024d
EDAC, altera: Simplify calculation of total memory

Use of_address_to_resource() and resource_size() instead of manually
parsing the "reg" property from the "memory" node(s).

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Tested-by: Thor Thayer <thor.thayer@linux.intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/20170606235500.22772-3-chris.packham@alliedtelesis.co.nz
Signed-off-by: Borislav Petkov <bp@suse.de>
drivers/edac/altera_edac.c