diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-06-23 17:06:09 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2017-06-23 17:06:09 +0200 |
commit | 0281bafa39198be39283543c90e490545901e1a5 (patch) | |
tree | 3930005425004a1f13a3f0ab64136ac0df19725e /drivers | |
parent | e4fc0e50af8b65d6d936c528018415eb55e38933 (diff) | |
parent | 2941be2166c2146ded1d1806ae76e78c26b8d4fe (diff) |
Merge tag 'ccn/fixes-for-4.13-v2' of git://git.linaro.org/people/pawel.moll/linux into next/fixes-non-critical
Pull "bus: ARM CCN PMU driver updates" from Paweł Moll:
* Fixed missing module aliases, thus autoloading.
* Use appropriate (c)allocation function for arrays of structures.
* Add compatibility string (thus support) for CCN-502 variant.
* tag 'ccn/fixes-for-4.13-v2' of git://git.linaro.org/people/pawel.moll/linux:
bus: arm-ccn: Enable stats for CCN-502 interconnect
dt-bindings: arm-ccn: Add bindings info for CCN-502 compatible string
bus: arm-ccn: Use devm_kcalloc() in arm_ccn_probe()
bus: arm-ccn: Fix module autoload
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/bus/arm-ccn.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/bus/arm-ccn.c b/drivers/bus/arm-ccn.c index 4d6a2b7e4d3f..e8c6946fed9d 100644 --- a/drivers/bus/arm-ccn.c +++ b/drivers/bus/arm-ccn.c @@ -1520,10 +1520,10 @@ static int arm_ccn_probe(struct platform_device *pdev) if (err) return err; - ccn->node = devm_kzalloc(ccn->dev, sizeof(*ccn->node) * ccn->num_nodes, - GFP_KERNEL); - ccn->xp = devm_kzalloc(ccn->dev, sizeof(*ccn->node) * ccn->num_xps, - GFP_KERNEL); + ccn->node = devm_kcalloc(ccn->dev, ccn->num_nodes, sizeof(*ccn->node), + GFP_KERNEL); + ccn->xp = devm_kcalloc(ccn->dev, ccn->num_xps, sizeof(*ccn->node), + GFP_KERNEL); if (!ccn->node || !ccn->xp) return -ENOMEM; @@ -1544,9 +1544,11 @@ static int arm_ccn_remove(struct platform_device *pdev) } static const struct of_device_id arm_ccn_match[] = { + { .compatible = "arm,ccn-502", }, { .compatible = "arm,ccn-504", }, {}, }; +MODULE_DEVICE_TABLE(of, arm_ccn_match); static struct platform_driver arm_ccn_driver = { .driver = { |