aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-08-07 03:14:38 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2013-08-30 16:51:45 -0400
commit2fffc7982c990f089a4ab9bed10d90d1d657b3fc (patch)
tree4bd3f848a0d45b3133760e22f4288ea47180d282
parentb2b263f2e7f55a6bd5875a3cb7d0ab4bef433a7c (diff)
mtd: r852: Staticize local symbols
These local symbols are used only in this file. Fix the following sparse warnings: drivers/mtd/nand/r852.c:232:6: warning: symbol 'r852_write_buf' was not declared. Should it be static? drivers/mtd/nand/r852.c:264:6: warning: symbol 'r852_read_buf' was not declared. Should it be static? drivers/mtd/nand/r852.c:315:6: warning: symbol 'r852_cmdctl' was not declared. Should it be static? drivers/mtd/nand/r852.c:360:5: warning: symbol 'r852_wait' was not declared. Should it be static? drivers/mtd/nand/r852.c:389:5: warning: symbol 'r852_ready' was not declared. Should it be static? drivers/mtd/nand/r852.c:400:6: warning: symbol 'r852_ecc_hwctl' was not declared. Should it be static? drivers/mtd/nand/r852.c:432:5: warning: symbol 'r852_ecc_calculate' was not declared. Should it be static? drivers/mtd/nand/r852.c:464:5: warning: symbol 'r852_ecc_correct' was not declared. Should it be static? drivers/mtd/nand/r852.c:532:6: warning: symbol 'r852_engine_enable' was not declared. Should it be static? drivers/mtd/nand/r852.c:550:6: warning: symbol 'r852_engine_disable' was not declared. Should it be static? drivers/mtd/nand/r852.c:560:6: warning: symbol 'r852_card_update_present' was not declared. Should it be static? drivers/mtd/nand/r852.c:575:6: warning: symbol 'r852_update_card_detect' was not declared. Should it be static? drivers/mtd/nand/r852.c:589:9: warning: symbol 'r852_media_type_show' was not declared. Should it be static? drivers/mtd/nand/r852.c:600:1: warning: symbol 'dev_attr_media_type' was not declared. Should it be static? drivers/mtd/nand/r852.c:604:6: warning: symbol 'r852_update_media_status' was not declared. Should it be static? drivers/mtd/nand/r852.c:633:5: warning: symbol 'r852_register_nand_device' was not declared. Should it be static? drivers/mtd/nand/r852.c:671:6: warning: symbol 'r852_unregister_nand_device' was not declared. Should it be static? drivers/mtd/nand/r852.c:685:6: warning: symbol 'r852_card_detect_work' was not declared. Should it be static? drivers/mtd/nand/r852.c:824:6: warning: symbol 'r852_probe' was not declared. Should it be static? drivers/mtd/nand/r852.c:964:6: warning: symbol 'r852_remove' was not declared. Should it be static? drivers/mtd/nand/r852.c:995:6: warning: symbol 'r852_shutdown' was not declared. Should it be static? Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r--drivers/mtd/nand/r852.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/mtd/nand/r852.c b/drivers/mtd/nand/r852.c
index ef72884825f3..9dcf02d22aa8 100644
--- a/drivers/mtd/nand/r852.c
+++ b/drivers/mtd/nand/r852.c
@@ -229,7 +229,7 @@ static void r852_do_dma(struct r852_device *dev, uint8_t *buf, int do_read)
229/* 229/*
230 * Program data lines of the nand chip to send data to it 230 * Program data lines of the nand chip to send data to it
231 */ 231 */
232void r852_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len) 232static void r852_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len)
233{ 233{
234 struct r852_device *dev = r852_get_dev(mtd); 234 struct r852_device *dev = r852_get_dev(mtd);
235 uint32_t reg; 235 uint32_t reg;
@@ -261,7 +261,7 @@ void r852_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len)
261/* 261/*
262 * Read data lines of the nand chip to retrieve data 262 * Read data lines of the nand chip to retrieve data
263 */ 263 */
264void r852_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) 264static void r852_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
265{ 265{
266 struct r852_device *dev = r852_get_dev(mtd); 266 struct r852_device *dev = r852_get_dev(mtd);
267 uint32_t reg; 267 uint32_t reg;
@@ -312,7 +312,7 @@ static uint8_t r852_read_byte(struct mtd_info *mtd)
312/* 312/*
313 * Control several chip lines & send commands 313 * Control several chip lines & send commands
314 */ 314 */
315void r852_cmdctl(struct mtd_info *mtd, int dat, unsigned int ctrl) 315static void r852_cmdctl(struct mtd_info *mtd, int dat, unsigned int ctrl)
316{ 316{
317 struct r852_device *dev = r852_get_dev(mtd); 317 struct r852_device *dev = r852_get_dev(mtd);
318 318
@@ -357,7 +357,7 @@ void r852_cmdctl(struct mtd_info *mtd, int dat, unsigned int ctrl)
357 * Wait till card is ready. 357 * Wait till card is ready.
358 * based on nand_wait, but returns errors on DMA error 358 * based on nand_wait, but returns errors on DMA error
359 */ 359 */
360int r852_wait(struct mtd_info *mtd, struct nand_chip *chip) 360static int r852_wait(struct mtd_info *mtd, struct nand_chip *chip)
361{ 361{
362 struct r852_device *dev = chip->priv; 362 struct r852_device *dev = chip->priv;
363 363
@@ -386,7 +386,7 @@ int r852_wait(struct mtd_info *mtd, struct nand_chip *chip)
386 * Check if card is ready 386 * Check if card is ready
387 */ 387 */
388 388
389int r852_ready(struct mtd_info *mtd) 389static int r852_ready(struct mtd_info *mtd)
390{ 390{
391 struct r852_device *dev = r852_get_dev(mtd); 391 struct r852_device *dev = r852_get_dev(mtd);
392 return !(r852_read_reg(dev, R852_CARD_STA) & R852_CARD_STA_BUSY); 392 return !(r852_read_reg(dev, R852_CARD_STA) & R852_CARD_STA_BUSY);
@@ -397,7 +397,7 @@ int r852_ready(struct mtd_info *mtd)
397 * Set ECC engine mode 397 * Set ECC engine mode
398*/ 398*/
399 399
400void r852_ecc_hwctl(struct mtd_info *mtd, int mode) 400static void r852_ecc_hwctl(struct mtd_info *mtd, int mode)
401{ 401{
402 struct r852_device *dev = r852_get_dev(mtd); 402 struct r852_device *dev = r852_get_dev(mtd);
403 403
@@ -429,7 +429,7 @@ void r852_ecc_hwctl(struct mtd_info *mtd, int mode)
429 * Calculate ECC, only used for writes 429 * Calculate ECC, only used for writes
430 */ 430 */
431 431
432int r852_ecc_calculate(struct mtd_info *mtd, const uint8_t *dat, 432static int r852_ecc_calculate(struct mtd_info *mtd, const uint8_t *dat,
433 uint8_t *ecc_code) 433 uint8_t *ecc_code)
434{ 434{
435 struct r852_device *dev = r852_get_dev(mtd); 435 struct r852_device *dev = r852_get_dev(mtd);
@@ -461,7 +461,7 @@ int r852_ecc_calculate(struct mtd_info *mtd, const uint8_t *dat,
461 * Correct the data using ECC, hw did almost everything for us 461 * Correct the data using ECC, hw did almost everything for us
462 */ 462 */
463 463
464int r852_ecc_correct(struct mtd_info *mtd, uint8_t *dat, 464static int r852_ecc_correct(struct mtd_info *mtd, uint8_t *dat,
465 uint8_t *read_ecc, uint8_t *calc_ecc) 465 uint8_t *read_ecc, uint8_t *calc_ecc)
466{ 466{
467 uint16_t ecc_reg; 467 uint16_t ecc_reg;
@@ -529,7 +529,7 @@ static int r852_read_oob(struct mtd_info *mtd, struct nand_chip *chip,
529 * Start the nand engine 529 * Start the nand engine
530 */ 530 */
531 531
532void r852_engine_enable(struct r852_device *dev) 532static void r852_engine_enable(struct r852_device *dev)
533{ 533{
534 if (r852_read_reg_dword(dev, R852_HW) & R852_HW_UNKNOWN) { 534 if (r852_read_reg_dword(dev, R852_HW) & R852_HW_UNKNOWN) {
535 r852_write_reg(dev, R852_CTL, R852_CTL_RESET | R852_CTL_ON); 535 r852_write_reg(dev, R852_CTL, R852_CTL_RESET | R852_CTL_ON);
@@ -547,7 +547,7 @@ void r852_engine_enable(struct r852_device *dev)
547 * Stop the nand engine 547 * Stop the nand engine
548 */ 548 */
549 549
550void r852_engine_disable(struct r852_device *dev) 550static void r852_engine_disable(struct r852_device *dev)
551{ 551{
552 r852_write_reg_dword(dev, R852_HW, 0); 552 r852_write_reg_dword(dev, R852_HW, 0);
553 r852_write_reg(dev, R852_CTL, R852_CTL_RESET); 553 r852_write_reg(dev, R852_CTL, R852_CTL_RESET);
@@ -557,7 +557,7 @@ void r852_engine_disable(struct r852_device *dev)
557 * Test if card is present 557 * Test if card is present
558 */ 558 */
559 559
560void r852_card_update_present(struct r852_device *dev) 560static void r852_card_update_present(struct r852_device *dev)
561{ 561{
562 unsigned long flags; 562 unsigned long flags;
563 uint8_t reg; 563 uint8_t reg;
@@ -572,7 +572,7 @@ void r852_card_update_present(struct r852_device *dev)
572 * Update card detection IRQ state according to current card state 572 * Update card detection IRQ state according to current card state
573 * which is read in r852_card_update_present 573 * which is read in r852_card_update_present
574 */ 574 */
575void r852_update_card_detect(struct r852_device *dev) 575static void r852_update_card_detect(struct r852_device *dev)
576{ 576{
577 int card_detect_reg = r852_read_reg(dev, R852_CARD_IRQ_ENABLE); 577 int card_detect_reg = r852_read_reg(dev, R852_CARD_IRQ_ENABLE);
578 dev->card_unstable = 0; 578 dev->card_unstable = 0;
@@ -586,8 +586,8 @@ void r852_update_card_detect(struct r852_device *dev)
586 r852_write_reg(dev, R852_CARD_IRQ_ENABLE, card_detect_reg); 586 r852_write_reg(dev, R852_CARD_IRQ_ENABLE, card_detect_reg);
587} 587}
588 588
589ssize_t r852_media_type_show(struct device *sys_dev, 589static ssize_t r852_media_type_show(struct device *sys_dev,
590 struct device_attribute *attr, char *buf) 590 struct device_attribute *attr, char *buf)
591{ 591{
592 struct mtd_info *mtd = container_of(sys_dev, struct mtd_info, dev); 592 struct mtd_info *mtd = container_of(sys_dev, struct mtd_info, dev);
593 struct r852_device *dev = r852_get_dev(mtd); 593 struct r852_device *dev = r852_get_dev(mtd);
@@ -597,11 +597,11 @@ ssize_t r852_media_type_show(struct device *sys_dev,
597 return strlen(data); 597 return strlen(data);
598} 598}
599 599
600DEVICE_ATTR(media_type, S_IRUGO, r852_media_type_show, NULL); 600static DEVICE_ATTR(media_type, S_IRUGO, r852_media_type_show, NULL);
601 601
602 602
603/* Detect properties of card in slot */ 603/* Detect properties of card in slot */
604void r852_update_media_status(struct r852_device *dev) 604static void r852_update_media_status(struct r852_device *dev)
605{ 605{
606 uint8_t reg; 606 uint8_t reg;
607 unsigned long flags; 607 unsigned long flags;
@@ -630,7 +630,7 @@ void r852_update_media_status(struct r852_device *dev)
630 * Register the nand device 630 * Register the nand device
631 * Called when the card is detected 631 * Called when the card is detected
632 */ 632 */
633int r852_register_nand_device(struct r852_device *dev) 633static int r852_register_nand_device(struct r852_device *dev)
634{ 634{
635 dev->mtd = kzalloc(sizeof(struct mtd_info), GFP_KERNEL); 635 dev->mtd = kzalloc(sizeof(struct mtd_info), GFP_KERNEL);
636 636
@@ -668,7 +668,7 @@ error1:
668 * Unregister the card 668 * Unregister the card
669 */ 669 */
670 670
671void r852_unregister_nand_device(struct r852_device *dev) 671static void r852_unregister_nand_device(struct r852_device *dev)
672{ 672{
673 if (!dev->card_registred) 673 if (!dev->card_registred)
674 return; 674 return;
@@ -682,7 +682,7 @@ void r852_unregister_nand_device(struct r852_device *dev)
682} 682}
683 683
684/* Card state updater */ 684/* Card state updater */
685void r852_card_detect_work(struct work_struct *work) 685static void r852_card_detect_work(struct work_struct *work)
686{ 686{
687 struct r852_device *dev = 687 struct r852_device *dev =
688 container_of(work, struct r852_device, card_detect_work.work); 688 container_of(work, struct r852_device, card_detect_work.work);
@@ -821,7 +821,7 @@ out:
821 return ret; 821 return ret;
822} 822}
823 823
824int r852_probe(struct pci_dev *pci_dev, const struct pci_device_id *id) 824static int r852_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
825{ 825{
826 int error; 826 int error;
827 struct nand_chip *chip; 827 struct nand_chip *chip;
@@ -961,7 +961,7 @@ error1:
961 return error; 961 return error;
962} 962}
963 963
964void r852_remove(struct pci_dev *pci_dev) 964static void r852_remove(struct pci_dev *pci_dev)
965{ 965{
966 struct r852_device *dev = pci_get_drvdata(pci_dev); 966 struct r852_device *dev = pci_get_drvdata(pci_dev);
967 967
@@ -992,7 +992,7 @@ void r852_remove(struct pci_dev *pci_dev)
992 pci_disable_device(pci_dev); 992 pci_disable_device(pci_dev);
993} 993}
994 994
995void r852_shutdown(struct pci_dev *pci_dev) 995static void r852_shutdown(struct pci_dev *pci_dev)
996{ 996{
997 struct r852_device *dev = pci_get_drvdata(pci_dev); 997 struct r852_device *dev = pci_get_drvdata(pci_dev);
998 998