summaryrefslogtreecommitdiff
path: root/drivers/ssb/main.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2013-06-18 09:33:40 +0400
committerJohn W. Linville <linville@tuxdriver.com>2013-06-18 22:46:46 +0400
commit7b5d6043de31290de98e9232cbd9a07968aef5bd (patch)
tree228e02ecbbe6b22041b8f6a5e7eba43bb852f5f9 /drivers/ssb/main.c
parente861ef523cd91270d108edc394e648b1f9e6fbd5 (diff)
downloadlinux-7b5d6043de31290de98e9232cbd9a07968aef5bd.tar.xz
ssb: register serial flash as platform device
This allows writing MTD driver working as a platform driver. In platform_data it will receive struct ssb_sflash, which contains all important data about flash (window, size). Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/ssb/main.c')
-rw-r--r--drivers/ssb/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index 812775a4bfb6..e55ddf7cd7c2 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -553,6 +553,14 @@ static int ssb_devices_register(struct ssb_bus *bus)
}
#endif
+#ifdef CONFIG_SSB_SFLASH
+ if (bus->mipscore.sflash.present) {
+ err = platform_device_register(&ssb_sflash_dev);
+ if (err)
+ pr_err("Error registering serial flash\n");
+ }
+#endif
+
return 0;
error:
/* Unwind the already registered devices. */