Commit graph

3 commits

Author SHA1 Message Date
Viresh Kumar 8ba2522fa8 greybus: raw: move module_{init|exit} to the end of functions
This is what coding guidelines say. Lets do it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-05-20 22:43:05 -07:00
Viresh Kumar 4f8ab1105d greybus: raw: include uaccess.h to fix warning
This is what I get over mainline:

greybus/raw.c: In function 'gb_raw_send':
greybus/raw.c:153:2: error: implicit declaration of function 'copy_from_user' [-Werror=implicit-function-declaration]
  if (copy_from_user(&request->data[0], data, len)) {
  ^
greybus/raw.c: In function 'raw_read':
greybus/raw.c:305:2: error: implicit declaration of function 'copy_to_user' [-Werror=implicit-function-declaration]
  if (copy_to_user(buf, &raw_data->data[0], raw_data->len)) {
  ^

Fix this by including uaccess.h.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-05-20 22:36:03 -07:00
Greg Kroah-Hartman e806c7fb8e greybus: raw: add raw greybus kernel driver
This adds a driver that implements the greybus Raw protocol as
specified.

It preserves the message boundries by only allowing a read to receive
a "full" message, and any write() call also is passed in a single
greybus request.

Totally untested, given that we have no raw firmware or gbsim code yet.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org>
2015-05-19 11:00:44 -07:00