lkml.org 
[lkml]   [2021]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 2/4] spi: spi-altera-dfl: support n5010 feature revision
From
Date


On 06/07/2021 16.56, Tom Rix wrote:
>> diff --git a/drivers/spi/spi-altera-dfl.c b/drivers/spi/spi-altera-dfl.c
>> index 3e32e4fe5895..f6cf7c8d9dac 100644
>> --- a/drivers/spi/spi-altera-dfl.c
>> +++ b/drivers/spi/spi-altera-dfl.c
>> @@ -111,6 +111,13 @@ static struct spi_board_info m10_bmc_info = {
>>       .chip_select = 0,
>>   };
>> +static struct spi_board_info m10_n5010_bmc_info = {
>> +    .modalias = "m10-n5010",
>> +    .max_speed_hz = 12500000,
>> +    .bus_num = 0,
>> +    .chip_select = 0,
>> +};
>
> Other then the modalias, this is exactly the same as m10_bmc_info.
>
> Why not set platform_data?

So like this?

+static struct spi_board_info m10_n5010_bmc_info = {
+ .platform_data = "m10-n5010",
+ .max_speed_hz = 12500000,
+ .bus_num = 0,
+ .chip_select = 0,
+};

I don't see how that should improve the situation, but we might allocate
the board info on the stack and set modalias dynamically instead?

// Martin

\
 
 \ /
  Last update: 2021-07-14 13:34    [W:0.138 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site