linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Max <max@enpas.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-ide@vger.kernel.org,
	Linux/m68k <linux-m68k@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] ata/pata_buddha: Probe via modalias instead of initcall
Date: Mon, 29 Jul 2019 12:49:23 +0200	[thread overview]
Message-ID: <c64543d3-10ee-c1a0-0010-f352d6fe937b@enpas.org> (raw)
In-Reply-To: <CAMuHMdXFW2mEg8jChA=JFt-u9NMGp9m+1FnoGe=+Pxme3O2ESg@mail.gmail.com>

On 07/29/2019 10:53 AM, Geert Uytterhoeven wrote:
>> +       switch (z->id) {
>> +       case ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA:
>> +       default:
>> +               type = BOARD_BUDDHA;
>> +               break;
>> +       case ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL:
>> +               type = BOARD_CATWEASEL;
>> +               nr_ports++;
>> +               break;
>> +       case ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF:
>> +               type = BOARD_XSURF;
>> +               break;
>> +       }
> 
> Please obtain the type from ent->driver_data instead of using a switch()
> statement...
> 
>> -module_init(pata_buddha_init_one);
>> +static const struct zorro_device_id pata_buddha_zorro_tbl[] = {
>> +       { ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA, },
>> +       { ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL, },
>> +       { ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF, },
> 
> ... after storing it in zorro_device_id.driver_data here.


Thanks Geert for your feedback, this is a good idea. I'll make this change.


Max

      reply	other threads:[~2019-07-29 10:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25 10:22 [PATCH v2] ata/pata_buddha: Probe via modalias instead of initcall Max Staudt
     [not found] ` <CGME20190725170359eucas1p271187268f749869088f60bf961194169@eucas1p2.samsung.com>
2019-07-25 17:03   ` Bartlomiej Zolnierkiewicz
2019-07-25 17:33     ` Max Staudt
2019-07-25 17:59       ` Max Staudt
2019-07-25 18:01     ` John Paul Adrian Glaubitz
2019-07-29  8:53 ` Geert Uytterhoeven
2019-07-29 10:49   ` Max [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=c64543d3-10ee-c1a0-0010-f352d6fe937b@enpas.org \
    --to=max@enpas.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@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).