aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdcore.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2011-12-30 09:11:14 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-01-09 13:26:06 -0500
commit33c87b4a2c820316314542ce3f60b8a8c6a96928 (patch)
tree5a9ddf940d8a2ca36f60dc37abe3b22d33598cc9 /drivers/mtd/mtdcore.c
parent52b020317f65114eeba2ee2cfa70a51a286f1d8a (diff)
mtd: mtdcore: export symbols cleanup
The mtdcore.c file is a bit inconsistent - some EXPORT_SYMBOL_GPL declarations follow the corresponding functions, some are placed at the end. This patch harmonizes the file so that EXPORT_SYMBOL_GPL declarations follow the corresponding function. It also removes few extra newlines and trailing white-spaces. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/mtdcore.c')
-rw-r--r--drivers/mtd/mtdcore.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 85a3f197e7f0..53a200f722b6 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -128,7 +128,7 @@ static int mtd_cls_suspend(struct device *dev, pm_message_t state)
128static int mtd_cls_resume(struct device *dev) 128static int mtd_cls_resume(struct device *dev)
129{ 129{
130 struct mtd_info *mtd = dev_get_drvdata(dev); 130 struct mtd_info *mtd = dev_get_drvdata(dev);
131 131
132 if (mtd && mtd->resume) 132 if (mtd && mtd->resume)
133 mtd_resume(mtd); 133 mtd_resume(mtd);
134 return 0; 134 return 0;
@@ -517,7 +517,6 @@ EXPORT_SYMBOL_GPL(mtd_device_unregister);
517 * or removal of MTD devices. Causes the 'add' callback to be immediately 517 * or removal of MTD devices. Causes the 'add' callback to be immediately
518 * invoked for each MTD device currently present in the system. 518 * invoked for each MTD device currently present in the system.
519 */ 519 */
520
521void register_mtd_user (struct mtd_notifier *new) 520void register_mtd_user (struct mtd_notifier *new)
522{ 521{
523 struct mtd_info *mtd; 522 struct mtd_info *mtd;
@@ -533,6 +532,7 @@ void register_mtd_user (struct mtd_notifier *new)
533 532
534 mutex_unlock(&mtd_table_mutex); 533 mutex_unlock(&mtd_table_mutex);
535} 534}
535EXPORT_SYMBOL_GPL(register_mtd_user);
536 536
537/** 537/**
538 * unregister_mtd_user - unregister a 'user' of MTD devices. 538 * unregister_mtd_user - unregister a 'user' of MTD devices.
@@ -543,7 +543,6 @@ void register_mtd_user (struct mtd_notifier *new)
543 * 'remove' callback to be immediately invoked for each MTD device 543 * 'remove' callback to be immediately invoked for each MTD device
544 * currently present in the system. 544 * currently present in the system.
545 */ 545 */
546
547int unregister_mtd_user (struct mtd_notifier *old) 546int unregister_mtd_user (struct mtd_notifier *old)
548{ 547{
549 struct mtd_info *mtd; 548 struct mtd_info *mtd;
@@ -559,7 +558,7 @@ int unregister_mtd_user (struct mtd_notifier *old)
559 mutex_unlock(&mtd_table_mutex); 558 mutex_unlock(&mtd_table_mutex);
560 return 0; 559 return 0;
561} 560}
562 561EXPORT_SYMBOL_GPL(unregister_mtd_user);
563 562
564/** 563/**
565 * get_mtd_device - obtain a validated handle for an MTD device 564 * get_mtd_device - obtain a validated handle for an MTD device
@@ -572,7 +571,6 @@ int unregister_mtd_user (struct mtd_notifier *old)
572 * both, return the num'th driver only if its address matches. Return 571 * both, return the num'th driver only if its address matches. Return
573 * error code if not. 572 * error code if not.
574 */ 573 */
575
576struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num) 574struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num)
577{ 575{
578 struct mtd_info *ret = NULL, *other; 576 struct mtd_info *ret = NULL, *other;
@@ -605,6 +603,7 @@ out:
605 mutex_unlock(&mtd_table_mutex); 603 mutex_unlock(&mtd_table_mutex);
606 return ret; 604 return ret;
607} 605}
606EXPORT_SYMBOL_GPL(get_mtd_device);
608 607
609 608
610int __get_mtd_device(struct mtd_info *mtd) 609int __get_mtd_device(struct mtd_info *mtd)
@@ -625,6 +624,7 @@ int __get_mtd_device(struct mtd_info *mtd)
625 mtd->usecount++; 624 mtd->usecount++;
626 return 0; 625 return 0;
627} 626}
627EXPORT_SYMBOL_GPL(__get_mtd_device);
628 628
629/** 629/**
630 * get_mtd_device_nm - obtain a validated handle for an MTD device by 630 * get_mtd_device_nm - obtain a validated handle for an MTD device by
@@ -634,7 +634,6 @@ int __get_mtd_device(struct mtd_info *mtd)
634 * This function returns MTD device description structure in case of 634 * This function returns MTD device description structure in case of
635 * success and an error code in case of failure. 635 * success and an error code in case of failure.
636 */ 636 */
637
638struct mtd_info *get_mtd_device_nm(const char *name) 637struct mtd_info *get_mtd_device_nm(const char *name)
639{ 638{
640 int err = -ENODEV; 639 int err = -ENODEV;
@@ -663,6 +662,7 @@ out_unlock:
663 mutex_unlock(&mtd_table_mutex); 662 mutex_unlock(&mtd_table_mutex);
664 return ERR_PTR(err); 663 return ERR_PTR(err);
665} 664}
665EXPORT_SYMBOL_GPL(get_mtd_device_nm);
666 666
667void put_mtd_device(struct mtd_info *mtd) 667void put_mtd_device(struct mtd_info *mtd)
668{ 668{
@@ -671,6 +671,7 @@ void put_mtd_device(struct mtd_info *mtd)
671 mutex_unlock(&mtd_table_mutex); 671 mutex_unlock(&mtd_table_mutex);
672 672
673} 673}
674EXPORT_SYMBOL_GPL(put_mtd_device);
674 675
675void __put_mtd_device(struct mtd_info *mtd) 676void __put_mtd_device(struct mtd_info *mtd)
676{ 677{
@@ -682,6 +683,7 @@ void __put_mtd_device(struct mtd_info *mtd)
682 683
683 module_put(mtd->owner); 684 module_put(mtd->owner);
684} 685}
686EXPORT_SYMBOL_GPL(__put_mtd_device);
685 687
686/* 688/*
687 * default_mtd_writev - the default writev method 689 * default_mtd_writev - the default writev method
@@ -714,6 +716,7 @@ int default_mtd_writev(struct mtd_info *mtd, const struct kvec *vecs,
714 *retlen = totlen; 716 *retlen = totlen;
715 return ret; 717 return ret;
716} 718}
719EXPORT_SYMBOL_GPL(default_mtd_writev);
717 720
718/** 721/**
719 * mtd_kmalloc_up_to - allocate a contiguous buffer up to the specified size 722 * mtd_kmalloc_up_to - allocate a contiguous buffer up to the specified size
@@ -763,15 +766,6 @@ void *mtd_kmalloc_up_to(const struct mtd_info *mtd, size_t *size)
763 */ 766 */
764 return kmalloc(*size, GFP_KERNEL); 767 return kmalloc(*size, GFP_KERNEL);
765} 768}
766
767EXPORT_SYMBOL_GPL(get_mtd_device);
768EXPORT_SYMBOL_GPL(get_mtd_device_nm);
769EXPORT_SYMBOL_GPL(__get_mtd_device);
770EXPORT_SYMBOL_GPL(put_mtd_device);
771EXPORT_SYMBOL_GPL(__put_mtd_device);
772EXPORT_SYMBOL_GPL(register_mtd_user);
773EXPORT_SYMBOL_GPL(unregister_mtd_user);
774EXPORT_SYMBOL_GPL(default_mtd_writev);
775EXPORT_SYMBOL_GPL(mtd_kmalloc_up_to); 769EXPORT_SYMBOL_GPL(mtd_kmalloc_up_to);
776 770
777#ifdef CONFIG_PROC_FS 771#ifdef CONFIG_PROC_FS