bcma: move code for core registration into separate function
bcma: move code for core registration into separate function

This cleans code a bit and will us to register cores in other places as
well. The only difference with this patch is using "core_index" for
setting device name.

Signed-off-by: Rafał Miłecki <dced371c11179e2cb83b1e305b9d7b15f379452b@gmail.com>
Acked-by: Hauke Mehrtens <435ddd46dc66c007a1fa20144c823d37e0d23436@hauke-m.de>
Signed-off-by: John W. Linville <2a53bac7a5d324865ef46ec4c38b2c0fba1456b4@tuxdriver.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs