
12 Jan
2012
12 Jan
'12
4:40 p.m.
On Thu, Jan 12, 2012 at 1:27 PM, Dirk Behme dirk.behme@de.bosch.com wrote:
+static s32 spi_reset(struct spi_slave *slave) +{
- u32 clk_src = mxc_get_clock(MXC_CSPI_CLK);
- u32 pre_div = 0, post_div = 0, reg_ctrl, reg_config;
- struct imx_spi_dev_t *dev = to_imx_spi_slave(slave);
- struct spi_reg_t *reg = &(dev->reg);
- if (dev->freq == 0) {
- printf("Error: desired clock is 0\n");
- return 1;
I think that returning a negative error code, such as -EINVAL would be better here.
Regards,
Fabio Estevam