diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2013-06-18 01:33:40 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-06-18 14:46:46 -0400 |
commit | 7b5d6043de31290de98e9232cbd9a07968aef5bd (patch) | |
tree | 228e02ecbbe6b22041b8f6a5e7eba43bb852f5f9 /drivers/ssb/main.c | |
parent | e861ef523cd91270d108edc394e648b1f9e6fbd5 (diff) |
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.c | 8 |
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) | |||
553 | } | 553 | } |
554 | #endif | 554 | #endif |
555 | 555 | ||
556 | #ifdef CONFIG_SSB_SFLASH | ||
557 | if (bus->mipscore.sflash.present) { | ||
558 | err = platform_device_register(&ssb_sflash_dev); | ||
559 | if (err) | ||
560 | pr_err("Error registering serial flash\n"); | ||
561 | } | ||
562 | #endif | ||
563 | |||
556 | return 0; | 564 | return 0; |
557 | error: | 565 | error: |
558 | /* Unwind the already registered devices. */ | 566 | /* Unwind the already registered devices. */ |