lkml.org 
[lkml]   [2017]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 07/14] regmap: Add SoundWire bus support
On Thu, Oct 19, 2017 at 08:33:23AM +0530, Vinod Koul wrote:

> + * BSD LICENSE
> + *
> + * Copyright(c) 2015-17 Intel Corporation.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:

Really unhappy with the dual licensing for regmap code, this is
interface code for some GPL only kernel code and...

> +static int regmap_sdw_write(void *context, unsigned int reg, unsigned int val)
> +{
> + struct device *dev = context;
> + struct sdw_slave *slave = dev_to_sdw_dev(dev);
> +
> + /* Check for Slave */
> + if (!slave)
> + return 0;

We silently ignore the device not existing?

> +static struct regmap_bus regmap_sdw = {
> + .reg_read = regmap_sdw_read,
> + .reg_write = regmap_sdw_write,

Given that the bus appears to support bulk operations why are we
implementing this with reg_read() and reg_write()?

> + return ERR_PTR(ret);
> +
> + return __regmap_init(&sdw->dev, &regmap_sdw,
> + &sdw->dev, config, lock_key, lock_name);
> +}
> +EXPORT_SYMBOL(__regmap_init_sdw);

...this is just an obvious attempt to allow non-GPL code to directly use
GPL code.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-10-22 17:49    [W:0.388 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site