aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h110
1 files changed, 51 insertions, 59 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 8ff7dc801fd5..ffbcf95cd97d 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -623,8 +623,8 @@ static inline const char *dev_name(const struct device *dev)
623 return kobject_name(&dev->kobj); 623 return kobject_name(&dev->kobj);
624} 624}
625 625
626extern int dev_set_name(struct device *dev, const char *name, ...) 626extern __printf(2, 3)
627 __attribute__((format(printf, 2, 3))); 627int dev_set_name(struct device *dev, const char *name, ...);
628 628
629#ifdef CONFIG_NUMA 629#ifdef CONFIG_NUMA
630static inline int dev_to_node(struct device *dev) 630static inline int dev_to_node(struct device *dev)
@@ -758,10 +758,10 @@ extern struct device *device_create_vargs(struct class *cls,
758 void *drvdata, 758 void *drvdata,
759 const char *fmt, 759 const char *fmt,
760 va_list vargs); 760 va_list vargs);
761extern struct device *device_create(struct class *cls, struct device *parent, 761extern __printf(5, 6)
762 dev_t devt, void *drvdata, 762struct device *device_create(struct class *cls, struct device *parent,
763 const char *fmt, ...) 763 dev_t devt, void *drvdata,
764 __attribute__((format(printf, 5, 6))); 764 const char *fmt, ...);
765extern void device_destroy(struct class *cls, dev_t devt); 765extern void device_destroy(struct class *cls, dev_t devt);
766 766
767/* 767/*
@@ -805,64 +805,56 @@ extern const char *dev_driver_string(const struct device *dev);
805 805
806extern int __dev_printk(const char *level, const struct device *dev, 806extern int __dev_printk(const char *level, const struct device *dev,
807 struct va_format *vaf); 807 struct va_format *vaf);
808extern int dev_printk(const char *level, const struct device *dev, 808extern __printf(3, 4)
809 const char *fmt, ...) 809int dev_printk(const char *level, const struct device *dev,
810 __attribute__ ((format (printf, 3, 4))); 810 const char *fmt, ...)
811extern int dev_emerg(const struct device *dev, const char *fmt, ...) 811 ;
812 __attribute__ ((format (printf, 2, 3))); 812extern __printf(2, 3)
813extern int dev_alert(const struct device *dev, const char *fmt, ...) 813int dev_emerg(const struct device *dev, const char *fmt, ...);
814 __attribute__ ((format (printf, 2, 3))); 814extern __printf(2, 3)
815extern int dev_crit(const struct device *dev, const char *fmt, ...) 815int dev_alert(const struct device *dev, const char *fmt, ...);
816 __attribute__ ((format (printf, 2, 3))); 816extern __printf(2, 3)
817extern int dev_err(const struct device *dev, const char *fmt, ...) 817int dev_crit(const struct device *dev, const char *fmt, ...);
818 __attribute__ ((format (printf, 2, 3))); 818extern __printf(2, 3)
819extern int dev_warn(const struct device *dev, const char *fmt, ...) 819int dev_err(const struct device *dev, const char *fmt, ...);
820 __attribute__ ((format (printf, 2, 3))); 820extern __printf(2, 3)
821extern int dev_notice(const struct device *dev, const char *fmt, ...) 821int dev_warn(const struct device *dev, const char *fmt, ...);
822 __attribute__ ((format (printf, 2, 3))); 822extern __printf(2, 3)
823extern int _dev_info(const struct device *dev, const char *fmt, ...) 823int dev_notice(const struct device *dev, const char *fmt, ...);
824 __attribute__ ((format (printf, 2, 3))); 824extern __printf(2, 3)
825int _dev_info(const struct device *dev, const char *fmt, ...);
825 826
826#else 827#else
827 828
828static inline int __dev_printk(const char *level, const struct device *dev, 829static inline int __dev_printk(const char *level, const struct device *dev,
829 struct va_format *vaf) 830 struct va_format *vaf)
830 { return 0; } 831{ return 0; }
831static inline int dev_printk(const char *level, const struct device *dev, 832static inline __printf(3, 4)
832 const char *fmt, ...) 833int dev_printk(const char *level, const struct device *dev,
833 __attribute__ ((format (printf, 3, 4))); 834 const char *fmt, ...)
834static inline int dev_printk(const char *level, const struct device *dev, 835{ return 0; }
835 const char *fmt, ...) 836
836 { return 0; } 837static inline __printf(2, 3)
837 838int dev_emerg(const struct device *dev, const char *fmt, ...)
838static inline int dev_emerg(const struct device *dev, const char *fmt, ...) 839{ return 0; }
839 __attribute__ ((format (printf, 2, 3))); 840static inline __printf(2, 3)
840static inline int dev_emerg(const struct device *dev, const char *fmt, ...) 841int dev_crit(const struct device *dev, const char *fmt, ...)
841 { return 0; } 842{ return 0; }
842static inline int dev_crit(const struct device *dev, const char *fmt, ...) 843static inline __printf(2, 3)
843 __attribute__ ((format (printf, 2, 3))); 844int dev_alert(const struct device *dev, const char *fmt, ...)
844static inline int dev_crit(const struct device *dev, const char *fmt, ...) 845{ return 0; }
845 { return 0; } 846static inline __printf(2, 3)
846static inline int dev_alert(const struct device *dev, const char *fmt, ...) 847int dev_err(const struct device *dev, const char *fmt, ...)
847 __attribute__ ((format (printf, 2, 3))); 848{ return 0; }
848static inline int dev_alert(const struct device *dev, const char *fmt, ...) 849static inline __printf(2, 3)
849 { return 0; } 850int dev_warn(const struct device *dev, const char *fmt, ...)
850static inline int dev_err(const struct device *dev, const char *fmt, ...) 851{ return 0; }
851 __attribute__ ((format (printf, 2, 3))); 852static inline __printf(2, 3)
852static inline int dev_err(const struct device *dev, const char *fmt, ...) 853int dev_notice(const struct device *dev, const char *fmt, ...)
853 { return 0; } 854{ return 0; }
854static inline int dev_warn(const struct device *dev, const char *fmt, ...) 855static inline __printf(2, 3)
855 __attribute__ ((format (printf, 2, 3))); 856int _dev_info(const struct device *dev, const char *fmt, ...)
856static inline int dev_warn(const struct device *dev, const char *fmt, ...) 857{ return 0; }
857 { return 0; }
858static inline int dev_notice(const struct device *dev, const char *fmt, ...)
859 __attribute__ ((format (printf, 2, 3)));
860static inline int dev_notice(const struct device *dev, const char *fmt, ...)
861 { return 0; }
862static inline int _dev_info(const struct device *dev, const char *fmt, ...)
863 __attribute__ ((format (printf, 2, 3)));
864static inline int _dev_info(const struct device *dev, const char *fmt, ...)
865 { return 0; }
866 858
867#endif 859#endif
868 860