Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
* 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (73 commits) arm: fix up some samsung merge sysdev conversion problems firmware: Fix an oops on reading fw_priv->fw in sysfs loading file Drivers:hv: Fix a bug in vmbus_driver_unregister() driver core: remove __must_check from device_create_file debugfs: add missing #ifdef HAS_IOMEM arm: time.h: remove device.h #include driver-core: remove sysdev.h usage. clockevents: remove sysdev.h arm: convert sysdev_class to a regular subsystem arm: leds: convert sysdev_class to a regular subsystem kobject: remove kset_find_obj_hinted() m86k: gpio - convert sysdev_class to a regular subsystem mips: txx9_sram - convert sysdev_class to a regular subsystem mips: 7segled - convert sysdev_class to a regular subsystem sh: dma - convert sysdev_class to a regular subsystem sh: intc - convert sysdev_class to a regular subsystem power: suspend - convert sysdev_class to a regular subsystem power: qe_ic - convert sysdev_class to a regular subsystem power: cmm - convert sysdev_class to a regular subsystem s390: time - convert sysdev_class to a regular subsystem ... Fix up conflicts with 'struct sysdev' removal from various platform drivers that got changed: - arch/arm/mach-exynos/cpu.c - arch/arm/mach-exynos/irq-eint.c - arch/arm/mach-s3c64xx/common.c - arch/arm/mach-s3c64xx/cpu.c - arch/arm/mach-s5p64x0/cpu.c - arch/arm/mach-s5pv210/common.c - arch/arm/plat-samsung/include/plat/cpu.h - arch/powerpc/kernel/sysfs.c and fix up cpu_is_hotpluggable() as per Greg in include/linux/cpu.h
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/sysdev.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/module.h>
|
||||
@@ -26,16 +26,16 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices);
|
||||
* XXX: If/when a SMP-capable implementation of AVR32 will ever be
|
||||
* made, we must make sure that the code executes on the correct CPU.
|
||||
*/
|
||||
static ssize_t show_pc0event(struct sys_device *dev,
|
||||
struct sysdev_attribute *attr, char *buf)
|
||||
static ssize_t show_pc0event(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
unsigned long pccr;
|
||||
|
||||
pccr = sysreg_read(PCCR);
|
||||
return sprintf(buf, "0x%lx\n", (pccr >> 12) & 0x3f);
|
||||
}
|
||||
static ssize_t store_pc0event(struct sys_device *dev,
|
||||
struct sysdev_attribute *attr, const char *buf,
|
||||
static ssize_t store_pc0event(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf,
|
||||
size_t count)
|
||||
{
|
||||
unsigned long val;
|
||||
@@ -48,16 +48,16 @@ static ssize_t store_pc0event(struct sys_device *dev,
|
||||
sysreg_write(PCCR, val);
|
||||
return count;
|
||||
}
|
||||
static ssize_t show_pc0count(struct sys_device *dev,
|
||||
struct sysdev_attribute *attr, char *buf)
|
||||
static ssize_t show_pc0count(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
unsigned long pcnt0;
|
||||
|
||||
pcnt0 = sysreg_read(PCNT0);
|
||||
return sprintf(buf, "%lu\n", pcnt0);
|
||||
}
|
||||
static ssize_t store_pc0count(struct sys_device *dev,
|
||||
struct sysdev_attribute *attr,
|
||||
static ssize_t store_pc0count(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
unsigned long val;
|
||||
@@ -71,16 +71,16 @@ static ssize_t store_pc0count(struct sys_device *dev,
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t show_pc1event(struct sys_device *dev,
|
||||
struct sysdev_attribute *attr, char *buf)
|
||||
static ssize_t show_pc1event(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
unsigned long pccr;
|
||||
|
||||
pccr = sysreg_read(PCCR);
|
||||
return sprintf(buf, "0x%lx\n", (pccr >> 18) & 0x3f);
|
||||
}
|
||||
static ssize_t store_pc1event(struct sys_device *dev,
|
||||
struct sysdev_attribute *attr, const char *buf,
|
||||
static ssize_t store_pc1event(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf,
|
||||
size_t count)
|
||||
{
|
||||
unsigned long val;
|
||||
@@ -93,16 +93,16 @@ static ssize_t store_pc1event(struct sys_device *dev,
|
||||
sysreg_write(PCCR, val);
|
||||
return count;
|
||||
}
|
||||
static ssize_t show_pc1count(struct sys_device *dev,
|
||||
struct sysdev_attribute *attr, char *buf)
|
||||
static ssize_t show_pc1count(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
unsigned long pcnt1;
|
||||
|
||||
pcnt1 = sysreg_read(PCNT1);
|
||||
return sprintf(buf, "%lu\n", pcnt1);
|
||||
}
|
||||
static ssize_t store_pc1count(struct sys_device *dev,
|
||||
struct sysdev_attribute *attr, const char *buf,
|
||||
static ssize_t store_pc1count(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf,
|
||||
size_t count)
|
||||
{
|
||||
unsigned long val;
|
||||
@@ -116,16 +116,16 @@ static ssize_t store_pc1count(struct sys_device *dev,
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t show_pccycles(struct sys_device *dev,
|
||||
struct sysdev_attribute *attr, char *buf)
|
||||
static ssize_t show_pccycles(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
unsigned long pccnt;
|
||||
|
||||
pccnt = sysreg_read(PCCNT);
|
||||
return sprintf(buf, "%lu\n", pccnt);
|
||||
}
|
||||
static ssize_t store_pccycles(struct sys_device *dev,
|
||||
struct sysdev_attribute *attr, const char *buf,
|
||||
static ssize_t store_pccycles(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf,
|
||||
size_t count)
|
||||
{
|
||||
unsigned long val;
|
||||
@@ -139,16 +139,16 @@ static ssize_t store_pccycles(struct sys_device *dev,
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t show_pcenable(struct sys_device *dev,
|
||||
struct sysdev_attribute *attr, char *buf)
|
||||
static ssize_t show_pcenable(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
unsigned long pccr;
|
||||
|
||||
pccr = sysreg_read(PCCR);
|
||||
return sprintf(buf, "%c\n", (pccr & 1)?'1':'0');
|
||||
}
|
||||
static ssize_t store_pcenable(struct sys_device *dev,
|
||||
struct sysdev_attribute *attr, const char *buf,
|
||||
static ssize_t store_pcenable(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf,
|
||||
size_t count)
|
||||
{
|
||||
unsigned long pccr, val;
|
||||
@@ -167,12 +167,12 @@ static ssize_t store_pcenable(struct sys_device *dev,
|
||||
return count;
|
||||
}
|
||||
|
||||
static SYSDEV_ATTR(pc0event, 0600, show_pc0event, store_pc0event);
|
||||
static SYSDEV_ATTR(pc0count, 0600, show_pc0count, store_pc0count);
|
||||
static SYSDEV_ATTR(pc1event, 0600, show_pc1event, store_pc1event);
|
||||
static SYSDEV_ATTR(pc1count, 0600, show_pc1count, store_pc1count);
|
||||
static SYSDEV_ATTR(pccycles, 0600, show_pccycles, store_pccycles);
|
||||
static SYSDEV_ATTR(pcenable, 0600, show_pcenable, store_pcenable);
|
||||
static DEVICE_ATTR(pc0event, 0600, show_pc0event, store_pc0event);
|
||||
static DEVICE_ATTR(pc0count, 0600, show_pc0count, store_pc0count);
|
||||
static DEVICE_ATTR(pc1event, 0600, show_pc1event, store_pc1event);
|
||||
static DEVICE_ATTR(pc1count, 0600, show_pc1count, store_pc1count);
|
||||
static DEVICE_ATTR(pccycles, 0600, show_pccycles, store_pccycles);
|
||||
static DEVICE_ATTR(pcenable, 0600, show_pcenable, store_pcenable);
|
||||
|
||||
#endif /* CONFIG_PERFORMANCE_COUNTERS */
|
||||
|
||||
@@ -186,12 +186,12 @@ static int __init topology_init(void)
|
||||
register_cpu(c, cpu);
|
||||
|
||||
#ifdef CONFIG_PERFORMANCE_COUNTERS
|
||||
sysdev_create_file(&c->sysdev, &attr_pc0event);
|
||||
sysdev_create_file(&c->sysdev, &attr_pc0count);
|
||||
sysdev_create_file(&c->sysdev, &attr_pc1event);
|
||||
sysdev_create_file(&c->sysdev, &attr_pc1count);
|
||||
sysdev_create_file(&c->sysdev, &attr_pccycles);
|
||||
sysdev_create_file(&c->sysdev, &attr_pcenable);
|
||||
device_create_file(&c->dev, &dev_attr_pc0event);
|
||||
device_create_file(&c->dev, &dev_attr_pc0count);
|
||||
device_create_file(&c->dev, &dev_attr_pc1event);
|
||||
device_create_file(&c->dev, &dev_attr_pc1count);
|
||||
device_create_file(&c->dev, &dev_attr_pccycles);
|
||||
device_create_file(&c->dev, &dev_attr_pcenable);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -14,7 +14,7 @@
|
||||
#include <linux/kernel_stat.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/sysdev.h>
|
||||
#include <linux/device.h>
|
||||
|
||||
/* May be overridden by platform code */
|
||||
int __weak nmi_enable(void)
|
||||
|
Reference in New Issue
Block a user