[PATCH v2] staging: comedi: adv_pci_dio: restore PCI-1753E support
Ian Abbott
abbotti at mev.co.uk
Fri Mar 15 17:59:47 UTC 2013
On 2013-03-15 17:48, H Hartley Sweeten wrote:
> On Friday, March 15, 2013 10:44 AM, Ian Abbott wrote:
>> On 2013-03-15 17:06, H Hartley Sweeten wrote:
>>> On Friday, March 15, 2013 3:32 AM, Ian Abbott wrote:
>>>> + if (pci_request_region(pcidev, PCIDIO_MAINREG, "adv_pci_dio") == 0) {
>>>
>>> Nitpick, is there any way to get the pci_driver name here instead of the
>>> open coded string?
>>
>> Sure, we could use `adv_pci_dio_pci_driver.name` (except it hasn't been
>> declared yet at that point), or `pcidev->driver->name`. It's only used
>> transiently though, so it doesn't matter much what string we use.
>
> Like I said, it's just a pitpick.
>
> I still would use pdidev->driver->name instead of the open coded string.
> It saves a couple bytes and if the driver name ever changes they would
> still match. Call it a pet peeve of mine... ;-)
I don't know if it uses more or fewer bytes (loading an immediate
address versus a couple of indirect indexed references) although the
difference wouldn't be much. The compiler should optimize identical
string literals to share the same storage.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti at mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
More information about the devel
mailing list