Commit f1ab57e3a114173fdb94219937191f0c673e87dd

Authored by Rafał Miłecki
Committed by John W. Linville
1 parent 4a5fc6d707

ssb: trivial: use pflash helper variable

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

Showing 1 changed file with 10 additions and 9 deletions Side-by-side Diff

drivers/ssb/driver_mipscore.c
... ... @@ -189,13 +189,14 @@
189 189 static void ssb_mips_flash_detect(struct ssb_mipscore *mcore)
190 190 {
191 191 struct ssb_bus *bus = mcore->dev->bus;
  192 + struct ssb_pflash *pflash = &mcore->pflash;
192 193  
193 194 /* When there is no chipcommon on the bus there is 4MB flash */
194 195 if (!ssb_chipco_available(&bus->chipco)) {
195   - mcore->pflash.present = true;
196   - mcore->pflash.buswidth = 2;
197   - mcore->pflash.window = SSB_FLASH1;
198   - mcore->pflash.window_size = SSB_FLASH1_SZ;
  196 + pflash->present = true;
  197 + pflash->buswidth = 2;
  198 + pflash->window = SSB_FLASH1;
  199 + pflash->window_size = SSB_FLASH1_SZ;
199 200 return;
200 201 }
201 202  
202 203  
203 204  
... ... @@ -208,14 +209,14 @@
208 209 break;
209 210 case SSB_CHIPCO_FLASHT_PARA:
210 211 pr_debug("Found parallel flash\n");
211   - mcore->pflash.present = true;
212   - mcore->pflash.window = SSB_FLASH2;
213   - mcore->pflash.window_size = SSB_FLASH2_SZ;
  212 + pflash->present = true;
  213 + pflash->window = SSB_FLASH2;
  214 + pflash->window_size = SSB_FLASH2_SZ;
214 215 if ((ssb_read32(bus->chipco.dev, SSB_CHIPCO_FLASH_CFG)
215 216 & SSB_CHIPCO_CFG_DS16) == 0)
216   - mcore->pflash.buswidth = 1;
  217 + pflash->buswidth = 1;
217 218 else
218   - mcore->pflash.buswidth = 2;
  219 + pflash->buswidth = 2;
219 220 break;
220 221 }
221 222 }