Use exported symbol bdevname() instead of disk_name()
[lttng-modules.git] / include / wrapper / genhd.h
index 807074ddcbe3e3102f010c52e63cfd37fc128a18..30fc5cea60ec75a8bb1b0cf38d7e0657d513e1fb 100644 (file)
 
 #include <linux/genhd.h>
 
-#ifdef CONFIG_KALLSYMS
+#ifdef CONFIG_KALLSYMS_ALL
 
 #include <linux/kallsyms.h>
 #include <wrapper/kallsyms.h>
 
-static inline
-char *wrapper_disk_name(struct gendisk *hd, int partno, char *buf)
-{
-       char *(*disk_name_sym)(struct gendisk *hd, int partno, char *buf);
-
-       disk_name_sym = (void *) kallsyms_lookup_funcptr("disk_name");
-       if (disk_name_sym) {
-               return disk_name_sym(hd, partno, buf);
-       } else {
-               printk_once(KERN_WARNING "LTTng: disk_name symbol lookup failed.\n");
-               return NULL;
-       }
-}
-
-#else
-
-static inline
-char *wrapper_disk_name(struct gendisk *hd, int partno, char *buf)
-{
-       return disk_name(hd, partno, buf);
-}
-
-#endif
-
-#ifdef CONFIG_KALLSYMS_ALL
-
 static inline
 struct class *wrapper_get_block_class(void)
 {
This page took 0.024819 seconds and 4 git commands to generate.