Commit af5ca3f4 authored by Kay Sievers's avatar Kay Sievers Committed by Greg Kroah-Hartman
Browse files

Driver core: change sysdev classes to use dynamic kobject names



All kobjects require a dynamically allocated name now. We no longer
need to keep track if the name is statically assigned, we can just
unconditionally free() all kobject names on cleanup.
Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 528a4bf1
......@@ -195,7 +195,7 @@ static int leds_shutdown(struct sys_device *dev)
}
static struct sysdev_class leds_sysclass = {
set_kset_name("leds"),
.name = "leds",
.shutdown = leds_shutdown,
.suspend = leds_suspend,
.resume = leds_resume,
......@@ -369,7 +369,7 @@ static int timer_resume(struct sys_device *dev)
#endif
static struct sysdev_class timer_sysclass = {
set_kset_name("timer"),
.name = "timer",
.suspend = timer_suspend,
.resume = timer_resume,
};
......
......@@ -214,7 +214,7 @@ static int irq_resume(struct sys_device *dev)
#endif
static struct sysdev_class irq_class = {
set_kset_name("irq"),
.name = "irq",
.suspend = irq_suspend,
.resume = irq_resume,
};
......
......@@ -566,7 +566,7 @@ static int cmx270_resume(struct sys_device *dev)
}
static struct sysdev_class cmx270_pm_sysclass = {
set_kset_name("pm"),
.name = "pm",
.resume = cmx270_resume,
.suspend = cmx270_suspend,
};
......
......@@ -122,7 +122,7 @@ static int lpd270_irq_resume(struct sys_device *dev)
}
static struct sysdev_class lpd270_irq_sysclass = {
set_kset_name("cpld_irq"),
.name = "cpld_irq",
.resume = lpd270_irq_resume,
};
......
......@@ -126,7 +126,7 @@ static int lubbock_irq_resume(struct sys_device *dev)
}
static struct sysdev_class lubbock_irq_sysclass = {
set_kset_name("cpld_irq"),
.name = "cpld_irq",
.resume = lubbock_irq_resume,
};
......
......@@ -120,7 +120,7 @@ static int mainstone_irq_resume(struct sys_device *dev)
}
static struct sysdev_class mainstone_irq_sysclass = {
set_kset_name("cpld_irq"),
.name = "cpld_irq",
.resume = mainstone_irq_resume,
};
......
......@@ -100,7 +100,7 @@ void __init s3c2410_init_clocks(int xtal)
}
struct sysdev_class s3c2410_sysclass = {
set_kset_name("s3c2410-core"),
.name = "s3c2410-core",
};
static struct sys_device s3c2410_sysdev = {
......
......@@ -196,7 +196,7 @@ void __init s3c2412_init_clocks(int xtal)
*/
struct sysdev_class s3c2412_sysclass = {
set_kset_name("s3c2412-core"),
.name = "s3c2412-core",
};
static int __init s3c2412_core_init(void)
......
......@@ -312,7 +312,7 @@ static int osiris_pm_resume(struct sys_device *sd)
#endif
static struct sysdev_class osiris_pm_sysclass = {
set_kset_name("mach-osiris"),
.name = "mach-osiris",
.suspend = osiris_pm_suspend,
.resume = osiris_pm_resume,
};
......
......@@ -43,7 +43,7 @@ static struct map_desc s3c2443_iodesc[] __initdata = {
};
struct sysdev_class s3c2443_sysclass = {
set_kset_name("s3c2443-core"),
.name = "s3c2443-core",
};
static struct sys_device s3c2443_sysdev = {
......
......@@ -283,7 +283,7 @@ static int sa1100irq_resume(struct sys_device *dev)
}
static struct sysdev_class sa1100irq_sysclass = {
set_kset_name("sa11x0-irq"),
.name = "sa11x0-irq",
.suspend = sa1100irq_suspend,
.resume = sa1100irq_resume,
};
......
......@@ -96,7 +96,7 @@ static int op_arm_resume(struct sys_device *dev)
}
static struct sysdev_class oprofile_sysclass = {
set_kset_name("oprofile"),
.name = "oprofile",
.resume = op_arm_resume,
.suspend = op_arm_suspend,
};
......
......@@ -1455,7 +1455,7 @@ static int omap_gpio_resume(struct sys_device *dev)
}
static struct sysdev_class omap_gpio_sysclass = {
set_kset_name("gpio"),
.name = "gpio",
.suspend = omap_gpio_suspend,
.resume = omap_gpio_resume,
};
......
......@@ -1265,7 +1265,7 @@ static int s3c2410_dma_resume(struct sys_device *dev)
#endif /* CONFIG_PM */
struct sysdev_class dma_sysclass = {
set_kset_name("s3c24xx-dma"),
.name = "s3c24xx-dma",
.suspend = s3c2410_dma_suspend,
.resume = s3c2410_dma_resume,
};
......
......@@ -151,13 +151,13 @@ static int s3c244x_resume(struct sys_device *dev)
/* Since the S3C2442 and S3C2440 share items, put both sysclasses here */
struct sysdev_class s3c2440_sysclass = {
set_kset_name("s3c2440-core"),
.name = "s3c2440-core",
.suspend = s3c244x_suspend,
.resume = s3c244x_resume
};
struct sysdev_class s3c2442_sysclass = {
set_kset_name("s3c2442-core"),
.name = "s3c2442-core",
.suspend = s3c244x_suspend,
.resume = s3c244x_resume
};
......
......@@ -214,7 +214,7 @@ void __init time_init(void)
}
static struct sysdev_class timer_class = {
set_kset_name("timer"),
.name = "timer",
};
static struct sys_device timer_device = {
......
......@@ -238,7 +238,7 @@ static int i8259A_shutdown(struct sys_device *dev)
}
static struct sysdev_class i8259_sysdev_class = {
set_kset_name("i8259"),
.name = "i8259",
.resume = i8259A_resume,
.shutdown = i8259A_shutdown,
};
......
......@@ -459,7 +459,7 @@ static int spu_shutdown(struct sys_device *sysdev)
}
static struct sysdev_class spu_sysdev_class = {
set_kset_name("spu"),
.name = "spu",
.shutdown = spu_shutdown,
};
......
......@@ -663,7 +663,7 @@ static int pmacpic_resume(struct sys_device *sysdev)
#endif /* CONFIG_PM && CONFIG_PPC32 */
static struct sysdev_class pmacpic_sysclass = {
set_kset_name("pmac_pic"),
.name = "pmac_pic",
};
static struct sys_device device_pmacpic = {
......
......@@ -725,7 +725,7 @@ unsigned int ipic_get_irq(void)
}
static struct sysdev_class ipic_sysclass = {
set_kset_name("ipic"),
.name = "ipic",
};
static struct sys_device device_ipic = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment