Skip to content

Commit

Permalink
Merge tag 'fpga-for-6.9-rc1' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/fpga/linux-fpga into char-misc-next

Xu writes:

FPGA Manager changes for 6.9-rc1

DFL:

- Ricardo's change makes dfl_bus_type const.

FPGA MGR core:

- Marco's change removes redundant checks for bridge ops.

All patches have been reviewed on the mailing list, and have been in the
last linux-next releases (as part of our for-next branch).

Signed-off-by: Xu Yilun <yilun.xu@intel.com>

* tag 'fpga-for-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga:
  fpga: remove redundant checks for bridge ops
  fpga: dfl: make dfl_bus_type const
  • Loading branch information
Greg Kroah-Hartman committed Mar 2, 2024
2 parents bac2f2c + b1a91ca commit a6a3bf9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/fpga/dfl.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ static struct attribute *dfl_dev_attrs[] = {
};
ATTRIBUTE_GROUPS(dfl_dev);

static struct bus_type dfl_bus_type = {
static const struct bus_type dfl_bus_type = {
.name = "dfl",
.match = dfl_bus_match,
.probe = dfl_bus_probe,
Expand Down
8 changes: 4 additions & 4 deletions drivers/fpga/fpga-bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int fpga_bridge_enable(struct fpga_bridge *bridge)
{
dev_dbg(&bridge->dev, "enable\n");

if (bridge->br_ops && bridge->br_ops->enable_set)
if (bridge->br_ops->enable_set)
return bridge->br_ops->enable_set(bridge, 1);

return 0;
Expand All @@ -48,7 +48,7 @@ int fpga_bridge_disable(struct fpga_bridge *bridge)
{
dev_dbg(&bridge->dev, "disable\n");

if (bridge->br_ops && bridge->br_ops->enable_set)
if (bridge->br_ops->enable_set)
return bridge->br_ops->enable_set(bridge, 0);

return 0;
Expand Down Expand Up @@ -296,7 +296,7 @@ static ssize_t state_show(struct device *dev,
struct fpga_bridge *bridge = to_fpga_bridge(dev);
int state = 1;

if (bridge->br_ops && bridge->br_ops->enable_show) {
if (bridge->br_ops->enable_show) {
state = bridge->br_ops->enable_show(bridge);
if (state < 0)
return state;
Expand Down Expand Up @@ -401,7 +401,7 @@ void fpga_bridge_unregister(struct fpga_bridge *bridge)
* If the low level driver provides a method for putting bridge into
* a desired state upon unregister, do it.
*/
if (bridge->br_ops && bridge->br_ops->fpga_bridge_remove)
if (bridge->br_ops->fpga_bridge_remove)
bridge->br_ops->fpga_bridge_remove(bridge);

device_unregister(&bridge->dev);
Expand Down

0 comments on commit a6a3bf9

Please sign in to comment.