linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Walmsley <richwalm@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH] input: DragonRise Inc. game controller force feedback support
Date: Tue, 3 Mar 2009 16:47:02 +1300	[thread overview]
Message-ID: <167575d80903021947k3a9d4b01vebea2e94a83d1ddc@mail.gmail.com> (raw)
In-Reply-To: <20090228141046.ZZRA012@mailhub.coreip.homeip.net>

Whoops. Sorry about that. I'll send it to the correct maintainer.

On Sun, Mar 1, 2009 at 11:15 AM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> Hi Richard,
>
> On Fri, Feb 27, 2009 at 02:44:11PM +1300, Richard Walmsley wrote:
>> Adds force feedback support for USB DragonRise Inc. game controllers.
>> These devices are mass produced in China and distributed under several vendors.
>>
>
> Looks pretty good, however it shoudl go through Jiri Kosina (CCed).
>
>> +
>> +static int drff_init(struct hid_device *hid)
>> +{
>> +     struct drff_device *drff;
>> +     struct hid_report *report;
>> +     struct hid_input *hidinput = list_entry(hid->inputs.next,
>> +                                             struct hid_input, list);
>
> list_first_entry()?
>
>> +     struct list_head *report_list =
>> +                     &hid->report_enum[HID_OUTPUT_REPORT].report_list;
>> +     struct list_head *report_ptr = report_list;
>> +     struct input_dev *dev = hidinput->input;
>> +     int error;
>> +
>> +     if (list_empty(report_list)) {
>> +             dev_err(&hid->dev, "no output reports found\n");
>> +             return -ENODEV;
>> +     }
>> +
>> +     report_ptr = report_ptr->next;
>> +
>> +     report = list_entry(report_ptr, struct hid_report, list);
>
> You might want to simply use list_first_entry() for this.
>
> --
> Dmitry
>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2009-03-03  3:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-27  1:44 [PATCH] input: DragonRise Inc. game controller force feedback support Richard Walmsley
2009-02-28 22:15 ` Dmitry Torokhov
2009-03-03  3:47   ` Richard Walmsley [this message]

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=167575d80903021947k3a9d4b01vebea2e94a83d1ddc@mail.gmail.com \
    --to=richwalm@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@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 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).