greybus: i2c: Use (already defined) major/minor macros

This change “greybus: i2c: Use (already defined) major/minor macros” in Linux kernel is authored by Viresh Kumar <viresh.kumar [at] linaro.org> on Sat Aug 8 10:25:36 2015 +0530.

greybus: i2c: Use (already defined) major/minor macros

We already have macros for these, use them instead of writing fixed
values.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>

This Linux change may have been applied to various maintained Linux releases and you can find Linux releases including commit bbd80cc.

There are 4 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/staging/greybus/i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/greybus/i2c.c b/drivers/staging/greybus/i2c.c
index 9514e69..edb6753 100644
--- a/drivers/staging/greybus/i2c.c
+++ b/drivers/staging/greybus/i2c.c
@@ -349,8 +349,8 @@ static void gb_i2c_connection_exit(struct gb_connection *connection)
 static struct gb_protocol i2c_protocol = {
 	.name			= "i2c",
 	.id			= GREYBUS_PROTOCOL_I2C,
-	.major			= 0,
-	.minor			= 1,
+	.major			= GB_I2C_VERSION_MAJOR,
+	.minor			= GB_I2C_VERSION_MINOR,
 	.connection_init	= gb_i2c_connection_init,
 	.connection_exit	= gb_i2c_connection_exit,
 	.request_recv		= NULL,	/* no incoming requests */

The commit for this change in Linux stable tree is bbd80cc (patch).

Leave a Reply

Your email address will not be published. Required fields are marked *