From: Youngmin Nam Date: Fri, 23 Nov 2018 07:33:53 +0000 (+0900) Subject: [RAMEN9610-9418][COMMON] debug: change function prototype related debug X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1691285527c3122af8649017ff2bc6306ee816df;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [RAMEN9610-9418][COMMON] debug: change function prototype related debug Change-Id: Ie89372fef3256a2f623aaba99cf713bb3fbecfce Signed-off-by: Youngmin Nam Signed-off-by: Youngwan Kim --- diff --git a/drivers/soc/samsung/debug/exynos-coresight.c b/drivers/soc/samsung/debug/exynos-coresight.c index da81e709c31c..9e90a6a80313 100644 --- a/drivers/soc/samsung/debug/exynos-coresight.c +++ b/drivers/soc/samsung/debug/exynos-coresight.c @@ -657,14 +657,14 @@ static struct bus_type ecs_subsys = { .dev_name = "exynos-cs", }; -static ssize_t ecs_enable_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) +static ssize_t ecs_enable_show(struct device *dev, + struct device_attribute *attr, char *buf) { return scnprintf(buf, 10, "%sable\n", FLAG_T32_EN ? "en" : "dis"); } -static ssize_t ecs_enable_store(struct kobject *kobj, - struct kobj_attribute *attr, +static ssize_t ecs_enable_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) { int en; @@ -680,7 +680,7 @@ static ssize_t ecs_enable_store(struct kobject *kobj, return count; } -static struct kobj_attribute ecs_enable_attr = +static struct device_attribute ecs_enable_attr = __ATTR(enabled, 0644, ecs_enable_show, ecs_enable_store); static struct attribute *ecs_sysfs_attrs[] = { diff --git a/drivers/soc/samsung/debug/exynos-helper.c b/drivers/soc/samsung/debug/exynos-helper.c index 86d37422a7e6..62c355fb12bc 100644 --- a/drivers/soc/samsung/debug/exynos-helper.c +++ b/drivers/soc/samsung/debug/exynos-helper.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -41,7 +42,7 @@ #include #endif -extern void (*arm_pm_restart)(char str, const char *cmd); +extern void (*arm_pm_restart)(enum reboot_mode str, const char *cmd); static void exynos_early_panic(void *val) { @@ -76,7 +77,7 @@ static void exynos_post_panic_entry(void *val) static void exynos_post_panic_exit(void *val) { #ifdef CONFIG_DEBUG_SNAPSHOT_PANIC_REBOOT - arm_pm_restart(0, "panic"); + arm_pm_restart(REBOOT_COLD, "panic"); #endif } diff --git a/drivers/soc/samsung/debug/exynos9610-itmon.c b/drivers/soc/samsung/debug/exynos9610-itmon.c index ee71ef07b090..247282080c11 100644 --- a/drivers/soc/samsung/debug/exynos9610-itmon.c +++ b/drivers/soc/samsung/debug/exynos9610-itmon.c @@ -1242,8 +1242,8 @@ static struct bus_type itmon_subsys = { .dev_name = "itmon", }; -static ssize_t itmon_timeout_fix_val_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) +static ssize_t itmon_timeout_fix_val_show(struct device *dev, + struct device_attribute *attr, char *buf) { ssize_t n = 0; struct itmon_platdata *pdata = g_itmon->pdata; @@ -1253,8 +1253,8 @@ static ssize_t itmon_timeout_fix_val_show(struct kobject *kobj, return n; } -static ssize_t itmon_timeout_fix_val_store(struct kobject *kobj, - struct kobj_attribute *attr, const char *buf, size_t count) +static ssize_t itmon_timeout_fix_val_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) { unsigned long val = simple_strtoul(buf, NULL, 0); struct itmon_platdata *pdata = g_itmon->pdata; @@ -1265,8 +1265,8 @@ static ssize_t itmon_timeout_fix_val_store(struct kobject *kobj, return count; } -static ssize_t itmon_scandump_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) +static ssize_t itmon_scandump_show(struct device *dev, + struct device_attribute *attr, char *buf) { ssize_t n = 0; struct itmon_platdata *pdata = g_itmon->pdata; @@ -1278,8 +1278,8 @@ static ssize_t itmon_scandump_show(struct kobject *kobj, return n; } -static ssize_t itmon_scandump_store(struct kobject *kobj, - struct kobj_attribute *attr, const char *buf, size_t count) +static ssize_t itmon_scandump_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) { unsigned long val = simple_strtoul(buf, NULL, 0); struct itmon_platdata *pdata = g_itmon->pdata; @@ -1292,8 +1292,8 @@ static ssize_t itmon_scandump_store(struct kobject *kobj, return count; } -static ssize_t itmon_timeout_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) +static ssize_t itmon_timeout_show(struct device *dev, + struct device_attribute *attr, char *buf) { unsigned long i, offset; ssize_t n = 0; @@ -1319,8 +1319,8 @@ static ssize_t itmon_timeout_show(struct kobject *kobj, return n; } -static ssize_t itmon_timeout_val_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) +static ssize_t itmon_timeout_val_show(struct device *dev, + struct device_attribute *attr, char *buf) { unsigned long i, offset; ssize_t n = 0; @@ -1346,8 +1346,8 @@ static ssize_t itmon_timeout_val_show(struct kobject *kobj, return n; } -static ssize_t itmon_timeout_freeze_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) +static ssize_t itmon_timeout_freeze_show(struct device *dev, + struct device_attribute *attr, char *buf) { unsigned long i, offset; ssize_t n = 0; @@ -1373,8 +1373,8 @@ static ssize_t itmon_timeout_freeze_show(struct kobject *kobj, return n; } -static ssize_t itmon_timeout_store(struct kobject *kobj, - struct kobj_attribute *attr, +static ssize_t itmon_timeout_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) { char *name; @@ -1411,8 +1411,8 @@ static ssize_t itmon_timeout_store(struct kobject *kobj, return count; } -static ssize_t itmon_timeout_val_store(struct kobject *kobj, - struct kobj_attribute *attr, +static ssize_t itmon_timeout_val_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) { char *name; @@ -1446,8 +1446,8 @@ static ssize_t itmon_timeout_val_store(struct kobject *kobj, return count; } -static ssize_t itmon_timeout_freeze_store(struct kobject *kobj, - struct kobj_attribute *attr, +static ssize_t itmon_timeout_freeze_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) { char *name; @@ -1484,15 +1484,15 @@ static ssize_t itmon_timeout_freeze_store(struct kobject *kobj, return count; } -static struct kobj_attribute itmon_timeout_attr = +static struct device_attribute itmon_timeout_attr = __ATTR(timeout_en, 0644, itmon_timeout_show, itmon_timeout_store); -static struct kobj_attribute itmon_timeout_fix_attr = +static struct device_attribute itmon_timeout_fix_attr = __ATTR(set_val, 0644, itmon_timeout_fix_val_show, itmon_timeout_fix_val_store); -static struct kobj_attribute itmon_scandump_attr = +static struct device_attribute itmon_scandump_attr = __ATTR(scandump_en, 0644, itmon_scandump_show, itmon_scandump_store); -static struct kobj_attribute itmon_timeout_val_attr = +static struct device_attribute itmon_timeout_val_attr = __ATTR(timeout_val, 0644, itmon_timeout_val_show, itmon_timeout_val_store); -static struct kobj_attribute itmon_timeout_freeze_attr = +static struct device_attribute itmon_timeout_freeze_attr = __ATTR(timeout_freeze, 0644, itmon_timeout_freeze_show, itmon_timeout_freeze_store); static struct attribute *itmon_sysfs_attrs[] = { diff --git a/lib/debug-snapshot-sysfs.c b/lib/debug-snapshot-sysfs.c index ed79f549f96a..a88f02c34376 100644 --- a/lib/debug-snapshot-sysfs.c +++ b/lib/debug-snapshot-sysfs.c @@ -47,8 +47,8 @@ extern int dss_irqlog_exlist[DSS_EX_MAX_NUM]; extern int dss_irqexit_exlist[DSS_EX_MAX_NUM]; extern unsigned int dss_irqexit_threshold; -static ssize_t dss_enable_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) +static ssize_t dss_enable_show(struct device *dev, + struct device_attribute *attr, char *buf) { struct dbg_snapshot_item *item; unsigned long i; @@ -68,8 +68,8 @@ static ssize_t dss_enable_show(struct kobject *kobj, return n; } -static ssize_t dss_enable_store(struct kobject *kobj, - struct kobj_attribute *attr, +static ssize_t dss_enable_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) { int en; @@ -96,8 +96,8 @@ static ssize_t dss_enable_store(struct kobject *kobj, return count; } -static ssize_t dss_callstack_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) +static ssize_t dss_callstack_show(struct device *dev, + struct device_attribute *attr, char *buf) { ssize_t n = 0; @@ -106,7 +106,7 @@ static ssize_t dss_callstack_show(struct kobject *kobj, return n; } -static ssize_t dss_callstack_store(struct kobject *kobj, struct kobj_attribute *attr, +static ssize_t dss_callstack_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { unsigned long callstack; @@ -121,8 +121,8 @@ static ssize_t dss_callstack_store(struct kobject *kobj, struct kobj_attribute * return count; } -static ssize_t dss_irqlog_exlist_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) +static ssize_t dss_irqlog_exlist_show(struct device *dev, + struct device_attribute *attr, char *buf) { unsigned long i; ssize_t n = 0; @@ -137,8 +137,8 @@ static ssize_t dss_irqlog_exlist_show(struct kobject *kobj, return n; } -static ssize_t dss_irqlog_exlist_store(struct kobject *kobj, - struct kobj_attribute *attr, +static ssize_t dss_irqlog_exlist_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) { unsigned long i; @@ -165,8 +165,8 @@ static ssize_t dss_irqlog_exlist_store(struct kobject *kobj, } #ifdef CONFIG_DEBUG_SNAPSHOT_IRQ_EXIT -static ssize_t dss_irqexit_exlist_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) +static ssize_t dss_irqexit_exlist_show(struct device *dev, + struct device_attribute *attr, char *buf) { unsigned long i; ssize_t n = 0; @@ -180,8 +180,8 @@ static ssize_t dss_irqexit_exlist_show(struct kobject *kobj, return n; } -static ssize_t dss_irqexit_exlist_store(struct kobject *kobj, - struct kobj_attribute *attr, +static ssize_t dss_irqexit_exlist_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) { unsigned long i; @@ -207,8 +207,8 @@ static ssize_t dss_irqexit_exlist_store(struct kobject *kobj, return count; } -static ssize_t dss_irqexit_threshold_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) +static ssize_t dss_irqexit_threshold_show(struct device *dev, + struct device_attribute *attr, char *buf) { ssize_t n; @@ -216,8 +216,8 @@ static ssize_t dss_irqexit_threshold_show(struct kobject *kobj, return n; } -static ssize_t dss_irqexit_threshold_store(struct kobject *kobj, - struct kobj_attribute *attr, +static ssize_t dss_irqexit_threshold_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) { unsigned long val; @@ -234,8 +234,8 @@ static ssize_t dss_irqexit_threshold_store(struct kobject *kobj, #endif #ifdef CONFIG_DEBUG_SNAPSHOT_REG -static ssize_t dss_reg_exlist_show(struct kobject *kobj, - struct kobj_attribute *attr, char *buf) +static ssize_t dss_reg_exlist_show(struct device *dev, + struct device_attribute *attr, char *buf) { unsigned long i; ssize_t n = 0; @@ -250,8 +250,8 @@ static ssize_t dss_reg_exlist_show(struct kobject *kobj, return n; } -static ssize_t dss_reg_exlist_store(struct kobject *kobj, - struct kobj_attribute *attr, +static ssize_t dss_reg_exlist_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) { unsigned long i; @@ -274,27 +274,27 @@ static ssize_t dss_reg_exlist_store(struct kobject *kobj, #endif -static struct kobj_attribute dss_enable_attr = +static struct device_attribute dss_enable_attr = __ATTR(enabled, 0644, dss_enable_show, dss_enable_store); -static struct kobj_attribute dss_callstack_attr = +static struct device_attribute dss_callstack_attr = __ATTR(callstack, 0644, dss_callstack_show, dss_callstack_store); -static struct kobj_attribute dss_irqlog_attr = +static struct device_attribute dss_irqlog_attr = __ATTR(exlist_irqdisabled, 0644, dss_irqlog_exlist_show, dss_irqlog_exlist_store); #ifdef CONFIG_DEBUG_SNAPSHOT_IRQ_EXIT -static struct kobj_attribute dss_irqexit_attr = +static struct device_attribute dss_irqexit_attr = __ATTR(exlist_irqexit, 0644, dss_irqexit_exlist_show, dss_irqexit_exlist_store); -static struct kobj_attribute dss_irqexit_threshold_attr = +static struct device_attribute dss_irqexit_threshold_attr = __ATTR(threshold_irqexit, 0644, dss_irqexit_threshold_show, dss_irqexit_threshold_store); #endif #ifdef CONFIG_DEBUG_SNAPSHOT_REG -static struct kobj_attribute dss_reg_attr = +static struct device_attribute dss_reg_attr = __ATTR(exlist_reg, 0644, dss_reg_exlist_show, dss_reg_exlist_store); #endif