lkml.org 
[lkml]   [2023]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] fpga: altera-ps-spi: Use spi_get_device_match_data()
On Sat, Oct 7, 2023 at 2:56 AM Xu Yilun <yilun.xu@linux.intel.com> wrote:
>
> On Sat, Oct 07, 2023 at 03:43:41PM +0800, Xu Yilun wrote:
> > On Fri, Oct 06, 2023 at 05:46:24PM -0500, Rob Herring wrote:
> > > Use preferred spi_get_device_match_data() instead of of_match_device() and
> > > spi_get_device_id() to get the driver match data. With this, adjust the
> > > includes to explicitly include the correct headers.
> > >
> > > Signed-off-by: Rob Herring <robh@kernel.org>
> >
> > Acked-by: Xu Yilun <yilun.xu@intel.com>
> >
> > Applied.
> >
> > >
> > > static const struct spi_device_id altera_ps_spi_ids[] = {
> > > - { "cyclone-ps-spi", CYCLONE5 },
> > > - { "fpga-passive-serial", CYCLONE5 },
> > > - { "fpga-arria10-passive-serial", ARRIA10 },
> > > + { "cyclone-ps-spi", (uintptr_t)&c5_data },
> > > + { "fpga-passive-serial", (uintptr_t)&c5_data },
> > > + { "fpga-arria10-passive-serial", (uintptr_t)&a10_data },
>
> Sorry, one more. Should cast to kernel_ulong_t?

Either will work. uintptr_t is somewhat new in the kernel and
preferred now I think.

Rob

\
 
 \ /
  Last update: 2023-10-09 14:48    [W:0.089 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site