All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: bonbons@linux-vserver.org
Cc: jikos@kernel.org, benjamin.tissoires@redhat.com,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Arvind Yadav <arvind.yadav.cs@gmail.com>
Subject: [PATCH] HID-PICOLCD: Dummy hid-picolcd functions should return error code
Date: Wed, 22 Jun 2016 00:08:40 +0530	[thread overview]
Message-ID: <1466534320-31256-1-git-send-email-arvind.yadav.cs@gmail.com> (raw)

- inline picolcd_fb_reset and picolcd_init_framebuffer stub simply
  allows compilation on systems with CONFIG_HID_PICOLCD_FB disabled.
- inline picolcd_init_backlight and picolcd_resume_backlight stub
  simply allows compilation on systems with CONFIG_HID_PICOLCD_BACKLIGHT
  disabled.
- inline picolcd_init_lcd and picolcd_resume_lcd stub simply allows
  compilation on systems with CONFIG_HID_PICOLCD_LCD disabled.
- inline picolcd_init_leds stub simply allows compilation on systems
  with CONFIG_HID_PICOLCD_LEDS disabled.
- inline picolcd_init_cir stub simply allows compilation on systems
  with CONFIG_HID_PICOLCD_CIR disabled.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/hid/hid-picolcd.h | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/hid/hid-picolcd.h b/drivers/hid/hid-picolcd.h
index e56d847..7e6c10a 100644
--- a/drivers/hid/hid-picolcd.h
+++ b/drivers/hid/hid-picolcd.h
@@ -17,6 +17,8 @@
  *   along with this software. If not see <http://www.gnu.org/licenses/>.  *
  ***************************************************************************/
 
+#include <linux/errno.h>
+
 #define PICOLCD_NAME "PicoLCD (graphic)"
 
 /* Report numbers */
@@ -192,11 +194,11 @@ void picolcd_fb_refresh(struct picolcd_data *data);
 #else
 static inline int picolcd_fb_reset(struct picolcd_data *data, int clear)
 {
-	return 0;
+	return -ENODEV;
 }
 static inline int picolcd_init_framebuffer(struct picolcd_data *data)
 {
-	return 0;
+	return -ENOMEM;
 }
 static inline void picolcd_exit_framebuffer(struct picolcd_data *data)
 {
@@ -221,14 +223,14 @@ void picolcd_suspend_backlight(struct picolcd_data *data);
 static inline int picolcd_init_backlight(struct picolcd_data *data,
 		struct hid_report *report)
 {
-	return 0;
+	return -ENODEV;
 }
 static inline void picolcd_exit_backlight(struct picolcd_data *data)
 {
 }
 static inline int picolcd_resume_backlight(struct picolcd_data *data)
 {
-	return 0;
+	return -ENODEV;
 }
 static inline void picolcd_suspend_backlight(struct picolcd_data *data)
 {
@@ -248,14 +250,14 @@ int picolcd_resume_lcd(struct picolcd_data *data);
 static inline int picolcd_init_lcd(struct picolcd_data *data,
 		struct hid_report *report)
 {
-	return 0;
+	return -ENODEV;
 }
 static inline void picolcd_exit_lcd(struct picolcd_data *data)
 {
 }
 static inline int picolcd_resume_lcd(struct picolcd_data *data)
 {
-	return 0;
+	return -ENODEV;
 }
 #endif /* CONFIG_HID_PICOLCD_LCD */
 
@@ -271,7 +273,7 @@ void picolcd_leds_set(struct picolcd_data *data);
 static inline int picolcd_init_leds(struct picolcd_data *data,
 		struct hid_report *report)
 {
-	return 0;
+	return -ENODEV;
 }
 static inline void picolcd_exit_leds(struct picolcd_data *data)
 {
@@ -297,7 +299,7 @@ static inline int picolcd_raw_cir(struct picolcd_data *data,
 }
 static inline int picolcd_init_cir(struct picolcd_data *data, struct hid_report *report)
 {
-	return 0;
+	return -ENOMEM;
 }
 static inline void picolcd_exit_cir(struct picolcd_data *data)
 {
-- 
1.9.1

             reply	other threads:[~2016-06-21 19:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21 18:38 Arvind Yadav [this message]
2016-06-22  7:33 ` [PATCH] HID-PICOLCD: Dummy hid-picolcd functions should return error code Bruno Prémont

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1466534320-31256-1-git-send-email-arvind.yadav.cs@gmail.com \
    --to=arvind.yadav.cs@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=bonbons@linux-vserver.org \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.