summaryrefslogtreecommitdiffstats
path: root/drivers/staging/samsung-laptop
diff options
context:
space:
mode:
authorJoe Perches2011-02-26 00:57:36 +0100
committerGreg Kroah-Hartman2011-02-27 16:16:26 +0100
commitdc5ecf45f3e772a9845c1afebfbc423474f2e46a (patch)
tree2d70f80a9219e241c47ebeb78c7f3ae9152ba100 /drivers/staging/samsung-laptop
parentstaging: samsung-laptop: address review comments (diff)
downloadkernel-qcow2-linux-dc5ecf45f3e772a9845c1afebfbc423474f2e46a.tar.gz
kernel-qcow2-linux-dc5ecf45f3e772a9845c1afebfbc423474f2e46a.tar.xz
kernel-qcow2-linux-dc5ecf45f3e772a9845c1afebfbc423474f2e46a.zip
Staging: samsung-laptop: Constify samsung-laptop.c
Change sabi_config to const. Reduces data, increases text ~200 bytes. $ size drivers/platform/x86/samsung-laptop.o* text data bss dec hex filename 6933 5084 1560 13577 3509 drivers/platform/x86/samsung-laptop.o.new 6765 5252 1560 13577 3509 drivers/platform/x86/samsung-laptop.o.old Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/samsung-laptop')
-rw-r--r--drivers/staging/samsung-laptop/samsung-laptop.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/samsung-laptop/samsung-laptop.c b/drivers/staging/samsung-laptop/samsung-laptop.c
index a8e82b8eb5d7..720c9eb2f8d2 100644
--- a/drivers/staging/samsung-laptop/samsung-laptop.c
+++ b/drivers/staging/samsung-laptop/samsung-laptop.c
@@ -108,12 +108,12 @@ struct sabi_performance_level {
struct sabi_config {
const char *test_string;
u16 main_function;
- struct sabi_header_offsets header_offsets;
- struct sabi_commands commands;
- struct sabi_performance_level performance_levels[4];
+ const struct sabi_header_offsets header_offsets;
+ const struct sabi_commands commands;
+ const struct sabi_performance_level performance_levels[4];
};
-static struct sabi_config sabi_configs[] = {
+static const struct sabi_config sabi_configs[] = {
{
.test_string = "SECLINUX",
@@ -211,7 +211,7 @@ static struct sabi_config sabi_configs[] = {
{ },
};
-static struct sabi_config *sabi_config;
+static const struct sabi_config *sabi_config;
static void __iomem *sabi;
static void __iomem *sabi_iface;
@@ -467,7 +467,7 @@ static ssize_t set_performance_level(struct device *dev,
if (count >= 1) {
int i;
for (i = 0; sabi_config->performance_levels[i].name; ++i) {
- struct sabi_performance_level *level =
+ const struct sabi_performance_level *level =
&sabi_config->performance_levels[i];
if (!strncasecmp(level->name, buf, strlen(level->name))) {
sabi_set_command(sabi_config->commands.set_performance_level,