[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160925235023.GC7312@infradead.org>
Date: Sun, 25 Sep 2016 16:50:23 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Ondrej Zary <linux@...nbow-software.org>
Cc: Christoph Hellwig <hch@...radead.org>,
Finn Thain <fthain@...egraphics.com.au>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] g_NCR5380: Stop using scsi_module.c
> +static int generic_NCR5380_isa_match(struct device *pdev, unsigned int ndev)
> +{
> + struct Scsi_Host *sh = NULL;
> +
> + sh = generic_NCR5380_hw_init(&driver_template, pdev, base[ndev],
> + irq[ndev], card[ndev]);
> + if (!sh && base[ndev])
> + printk(KERN_WARNING "Card not found at address 0x%03x\n",
> + base[ndev]);
> + if (!sh)
> + return 0;
>
> + dev_set_drvdata(pdev, sh);
Any reason not to move the dev_set_drvdata into generic_NCR5380_hw_init?
That would also allow to properly propagate the error down to the
caller, which would be useful for the PNP case.
Otherwise this look great to me.
Powered by blists - more mailing lists