[rt2x00-users] [PATCH 1/3] rt2x00: allow overriding eeprom through platform_data

Helmut Schaa helmut.schaa at googlemail.com
Fri Nov 30 00:35:21 AEDT 2012


On Thu, Nov 29, 2012 at 2:23 PM, Gabor Juhos <juhosg at openwrt.org> wrote:
> 2012.11.29. 13:33 keltezéssel, Helmut Schaa írta:
>
>> I fully agree with that. This code was added for initial SoC support
>> (rt305x) and worked on
>> some boards initially. The question is if we want to keep this code or
>> just error out in case
>> somebody tries to use rt2x00soc without platform data supplied ...
>
> After the patch, the 'REQUIRE_EEPROM_FILE' bit in 'rt2x00dev->cap_flags' will be
> always set by 'rt2x00soc_probe' for SoC devices and
> 'rt2x00lib_request_eeprom_file' is always called.
>
> If platform data is NULL, or if the name of the eeprom file is not set in
> platform data, 'rt2x00lib_request_eeprom_file' will print an error message then
> returns with -EINVAL thus 'rt2x00lib_probe_dev' will fail.
>
> This ensures that anyone who uses the code-base without setting the platform
> data will be informed about that. Maybe the error message can be changed to
> indicate that the eeprom file name must be set, or the ERROR() call can be
> replaced with a WARN_ON(), but it makes no sense to keep the code IMO.

Ok, I'm fine with dropping it.
Helmut




More information about the users mailing list