From: Orlando Chamberlain <orlandoch.dev@gmail.com>
To: Andy Shevchenko <andy@infradead.org>
Cc: Aditya Garg <gargaditya08@live.com>,
Jiri Kosina <jikos@kernel.org>,
"jkosina@suse.cz" <jkosina@suse.cz>,
"benjamin.tissoires@redhat.com" <benjamin.tissoires@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"ronald@innovation.ch" <ronald@innovation.ch>,
"kekrby@gmail.com" <kekrby@gmail.com>
Subject: Re: [PATCH 3/3] HID: apple-magic-backlight: Add driver for keyboard backlight on internal Magic Keyboards
Date: Thu, 16 Feb 2023 12:17:09 +1100 [thread overview]
Message-ID: <20230216121709.04c76b9d@redecorated-mbp> (raw)
In-Reply-To: <Y+jLCebet+aekGRv@smile.fi.intel.com>
On Sun, 12 Feb 2023 13:18:33 +0200
Andy Shevchenko <andy@infradead.org> wrote:
> On Fri, Feb 10, 2023 at 03:45:15AM +0000, Aditya Garg wrote:
> > From: Orlando Chamberlain <orlandoch.dev@gmail.com>
> >
> > This driver adds support for the keyboard backlight on Intel T2 Macs
> > with internal Magic Keyboards (MacBookPro16,x and MacBookAir9,1)
>
> ...
>
> > +#include <linux/hid.h>
> > +#include <linux/usb.h>
>
> Seems lack of some header inclusions, e.g. where struct led_classdev
> is defined or -ERRNO codes.
>
> > +#include "hid-ids.h"
>
> ...
>
> > +static void apple_magic_backlight_power_set(struct
> > apple_magic_backlight *backlight,
> > + char power, char rate)
>
> char is a beast, can we use u8 here and in similar cases?
>
> ...
>
> > + /* Ensure this usb endpoint is for the keyboard backlight,
> > not touchbar
> > + * backlight.
> > + */
>
> /*
> * Multi-line comment style
> * goes like this.
> */
>
> ...
>
> > + backlight = devm_kzalloc(&hdev->dev, sizeof(*backlight),
> > GFP_KERNEL);
>
> > +
>
> Redundant blank line.
>
> > + if (!backlight)
> > + return -ENOMEM;
>
> ...
>
> > +static struct hid_driver apple_magic_backlight_hid_driver = {
> > + .name = "apple-magic-backlight",
> > + .id_table = apple_magic_backlight_hid_ids,
> > + .probe = apple_magic_backlight_probe,
> > + .remove = apple_magic_backlight_remove,
> > +};
>
> > +
>
> Redundant blank line.
>
> > +module_hid_driver(apple_magic_backlight_hid_driver);
>
Thanks for pointing out all these, I'll make those changes in v2.
next prev parent reply other threads:[~2023-02-16 1:17 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 3:41 [PATCH 0/3] Touch Bar and Keyboard backlight driver for Intel Macs Aditya Garg
2023-02-10 3:43 ` [PATCH 1/3] HID: apple-ibridge: Add Apple iBridge HID driver for T1 chip Aditya Garg
2023-02-10 3:44 ` [PATCH 2/3] HID: apple-touchbar: Add driver for the Touch Bar on MacBook Pros Aditya Garg
2023-02-10 3:45 ` [PATCH 3/3] HID: apple-magic-backlight: Add driver for keyboard backlight on internal Magic Keyboards Aditya Garg
2023-02-10 16:25 ` Thomas Weißschuh
2023-02-10 23:24 ` Orlando Chamberlain
2023-02-11 2:23 ` Thomas Weißschuh
2023-02-11 2:42 ` Thomas Weißschuh
2023-02-11 16:56 ` Pavel Machek
2023-02-12 2:28 ` Orlando Chamberlain
2023-02-12 5:16 ` Aditya Garg
2023-02-12 11:18 ` Andy Shevchenko
2023-02-16 1:17 ` Orlando Chamberlain [this message]
2023-02-10 16:13 ` [PATCH 2/3] HID: apple-touchbar: Add driver for the Touch Bar on MacBook Pros Thomas Weißschuh
2023-02-12 11:56 ` Andy Shevchenko
2023-02-10 4:56 ` [PATCH 1/3] HID: apple-ibridge: Add Apple iBridge HID driver for T1 chip Thomas Weißschuh
2023-02-10 8:30 ` Aditya Garg
2023-02-10 8:39 ` Benjamin Tissoires
2023-02-10 8:54 ` Aditya Garg
2023-02-10 9:21 ` Benjamin Tissoires
2023-02-10 12:05 ` Aditya Garg
2023-02-10 12:20 ` Orlando Chamberlain
2023-02-10 13:07 ` Aditya Garg
2023-02-10 14:01 ` Benjamin Tissoires
2023-02-10 15:33 ` Thomas Weißschuh
2023-02-10 15:49 ` Aditya Garg
2023-02-10 18:36 ` Thomas Weißschuh
2023-02-12 11:35 ` Andy Shevchenko
2023-02-10 10:18 ` [PATCH 0/3] Touch Bar and Keyboard backlight driver for Intel Macs Andy Shevchenko
2023-02-10 10:41 ` Aditya Garg
2023-02-10 10:47 ` Orlando Chamberlain
2023-02-10 11:12 ` Andy Shevchenko
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=20230216121709.04c76b9d@redecorated-mbp \
--to=orlandoch.dev@gmail.com \
--cc=andy@infradead.org \
--cc=benjamin.tissoires@redhat.com \
--cc=gargaditya08@live.com \
--cc=jikos@kernel.org \
--cc=jkosina@suse.cz \
--cc=kekrby@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ronald@innovation.ch \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).