Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f719315b authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Dmitry Torokhov
Browse files

Input: constify device_type structures



Declare device_type structures as const as they are only stored in the
type field of a device structure. This field is of type const, so add
const to declaration of device_type structures.

File size before:
   text	   data	    bss	    dec	    hex	filename
  17184	   1344	     80	  18608	   48b0	drivers/input/input.o

File size after:
   text	   data	    bss	    dec	    hex	filename
  17248	   1280	     80	  18608	   48b0	drivers/input/input.o

File size before:
   text	   data	    bss	    dec	    hex	filename
   2355	    384	      8	   2747	    abb	drivers/input/rmi4/rmi_bus.o

File size after:
   text	   data	    bss	    dec	    hex	filename
   2483	    264	      8	   2755	    ac3	drivers/input/rmi4/rmi_bus.o

Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 0cce2845
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1749,7 +1749,7 @@ static const struct dev_pm_ops input_dev_pm_ops = {
};
#endif /* CONFIG_PM */

static struct device_type input_dev_type = {
static const struct device_type input_dev_type = {
	.groups		= input_dev_attr_groups,
	.release	= input_dev_release,
	.uevent		= input_dev_uevent,
+2 −2
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ static void rmi_release_device(struct device *dev)
	kfree(rmi_dev);
}

static struct device_type rmi_device_type = {
static const struct device_type rmi_device_type = {
	.name		= "rmi4_sensor",
	.release	= rmi_release_device,
};
@@ -134,7 +134,7 @@ static void rmi_release_function(struct device *dev)
	kfree(fn);
}

static struct device_type rmi_function_type = {
static const struct device_type rmi_function_type = {
	.name		= "rmi4_function",
	.release	= rmi_release_function,
};